zoukankan      html  css  js  c++  java
  • JQuery官方学习资料(译):Attributes

    • Attributes
        元素的属性可以为你的应用程序包含有用的信息,重要的是能够获取和设置它。
    • .attr()方法
        .attr()方法是可获取和可设置的,在设置状态下,.attr()可以接收一个key和一个value,或者一个对象包含了一个或多个键值对。
      • setter
    $( "a" ).attr( "href", "allMyHrefsAreTheSameNow.html" );
     
    $( "a" ).attr({
    title: "all titles are the same too!",
    href: "somethingNew.html"
    });
      • getter
    $( "a" ).attr( "href" ); // 返回文档中的第一个元素的href
  • 相关阅读:
    CSS样式表
    lianxi!
    传值
    lei!
    3.10
    if else&& stwitch break
    if else 语句
    2016.3.6
    进制转换
    PHP 面向对象的三大特征
  • 原文地址:https://www.cnblogs.com/liusuqi/p/3286400.html
Copyright © 2011-2022 走看看