zoukankan      html  css  js  c++  java
  • jquery学习手记(3)属性

    属性的格式如下:

    $.fn.attr

    该格式既可以获取属性的值也可以设置属性的值。示例如下:

    设置属性

    1 // Setting attributes
    2 $("a").attr( "href", "allMyHrefsAreTheSameNow.html" );
    3 $("a").attr({
    4 title: "all titles are the same too!",
    5 href: "somethingNew.html"
    6 });

    获取属性

    1 // Getting attributes
    2 $("a").attr("href"); // returns the href for the first a element in the document
  • 相关阅读:
    hdu 5072 Coprime (容斥)
    洛谷 P1411 树 (树形dp)
    Tr/ee AtCoder
    sys.path
    uname
    sys.platform
    Eclipse Basic
    Eclipse Color Theme
    Pydev
    scons
  • 原文地址:https://www.cnblogs.com/davidwang456/p/3018431.html
Copyright © 2011-2022 走看看