(031)jquery_dom操作_attr

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head>
    <title>form_checkbox.html</title>
    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <style type="text/css">
    </style>
    <script type="text/javascript" src="../js/jquery/jquery190.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            var value = $("#a1").attr("href");
            $("#tip").html(value);
        });
    </script>
  </head>
  
  <body>
        <h3>attr()方法设置元素属性</h3>
        <a href="http://127.0.0.1" id="a1">点我就变</a>
        <div>我改变后的地址是:<span id="tip"></span></div>
  </body>
</html>

 

posted @ 2014-12-16 09:25  雪中飞雁  阅读(112)  评论(0)    收藏  举报