• jQuery的html和css


      jQuery每次返回的都是当前的集合对象;

      每个方法用的时候都会把他的元素对象返回,他每次返回的都是最近的那个元素;

      1.addclass()  备选元素添加一个类名

      2.removeclass()  移除被选元素的类名

      3.after()  在被选元素的后面插入内容(html,jquery,css)

      4.before()  在被选元素的前面插入内容

      5.append()  在被选元素的结尾处插入内容

      5-1:appendto()  功能一样,写法不一样,内容写在前面

      6.prepend()  在被选元素的开头处插入内容

      7.attr()  既可以设置又可以返回

      7-1.prop()  设置和返回被选元素的属性  同attr()

      8.css()  被选元素设置或返回一个或多个css样式属性

      9.height()  设置或返回被选元素高的3种写法;

      10.width()  设置或返回被选元素的宽度;

      11.html()  设置或返回被选元素的内容;

      11-1.text()  只能插入文本

      12.insertBefore()  在被选元素前面插入html标签

      13.insertAfter()  在被选元素后面插入html标签

      14.scrollLeft()  设置或返回被选元素水平滚动条的位置

        scrollTop()  设置或返回被选元素的垂直滚动条的位置

      15.val()  设置或返回表单中的value值;

      

  • 相关阅读:
    LintCode "Maximum Gap"
    LintCode "Wood Cut"
    LintCode "Expression Evaluation"
    LintCode "Find Peak Element II"
    LintCode "Remove Node in Binary Search Tree"
    LintCode "Delete Digits"
    LintCode "Binary Representation"
    LeetCode "Game of Life"
    LintCode "Coins in a Line"
    LintCode "Word Break"
  • 原文地址:https://www.cnblogs.com/shangjun6/p/10451676.html
Copyright © 2020-2023  润新知