jQuery一些方法总结

来源:互联网 发布:tweenmax.js 百叶窗 编辑:程序博客网 时间:2024/05/17 04:01

1、confirm(JSON.stringify(json));//js中弹出json方法

2、onMouseover="this.style.cursor='pointer';this.style.cursor='hand'//兼容ie,火狐鼠标经过变成手型

3、$(li).addClass("color").siblings().removeClass();//js中

 li.color{//选中变背景色  css中
 background-color:#3399FF;
}

4、$("#showParam tr:not(:first)").hide();//id为showParam的table中除第一行全部隐藏

5、$('#id').attr('style','display:block');//设置显示

6、获得span标签中的值用.text()

原创粉丝点击