attr

English ['?tr] American ['?tr]

abbr.attractive ????, ????

jquery attr() ??? ???

??: attr() ???? ??? ??? ?? ?? ????? ?????. ???? ????? ?? ?? ??? ????.

??? ??: ??? ??? ???? ?????.

??: ??$(selector).attr(attribute

Parameters:

Parameter Description
attribute ? ?? ??? ?? ??? ?????. ?????

??/? ??: ??? ??? ??? ?? ?????.

??: ??$(selector).attr(attribute,value

????:

?? ??? ?? ?????. ??? ??? ??? ?? ?????. selector) .attr (attribute, function (index, oldvalue))
????Description
??? ??? ??? ?????.

???? :


parameter

description intribute

??? ??? ?????. oldvalue)?? ?? ???? ??? ?????. ? ??? ???? ??? ?? ?? ?? ?? ???? ???? ?? ??/? ?? ??? ? ????. <abbr id="qo6xs"><menu id="qo6xs"></menu></abbr>
  • ??? ??? ?? ? ??? ??? ?????. value. value?? ??? ??/? ?? ?????
    .

    jquery attr() ??? ?

    <html>
    <head>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
      $("button").click(function(){
        $("img").attr("width","180");
      });
    });
    </script>
    </head>
    <body>
    <img src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" />
    <br />
    <button>設(shè)置圖像的 width 屬性</button>
    </body>
    </html>
    ???? ?? ?

    ??? ????? ??? "???? ??" ??? ?????

  • <wbr id="qo6xs"><var id="qo6xs"></var></wbr>

    <thead id="qo6xs"><tbody id="qo6xs"><legend id="qo6xs"></legend></tbody></thead>
    <center id="qo6xs"><big id="qo6xs"></big></center>