jq的事件

  1. click()  $(“div”).click(function(){})   jq的点击事件

事件方法中this指向 当前绑定的元素对象 但是不能直接用this,使用$(this)

  1. bind()on() 给元素添加事件
  2. Hover(fn,fn)
  3. Keydown  keyup  mouseover mouseenter mouseleave mouseout  mousedown  mouseup mousemove

 

 

 

Jqhtmlcss

1.addclass() 给被选元素添加一个类

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

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

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

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

5.appendto()  append功能一样  但是写法不一样

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

6-1 prependto() prepend功能一样 写法不一样

7.attr() 设置和返回元素的属性  有四种写法

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

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

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

10.width() 设置或返回被选元素的宽度  3种写法

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

11-1 text()  只能插文本

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

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

14 scrollleft()  scrolltop()  

15 val()  设置或返回表单中的value值   针对表单

 

原文地址:https://www.cnblogs.com/txf-123/p/10520832.html