jquery绑定到Dom
操作步骤:
jquery绑定到Dom步骤
1.声明指定样式类的类名
2.修改其中的样式
3.加载时即设定click事件。
举例:$(document).ready(function () {
document.getElementById('comment').className = ".ui-tabs .ui-tabs-hide"; document.getElementById('comment').style.cssText = "display:block"; document.getElementById('question').className = ".ui-tabs .ui-tabs-hide"; document.getElementById('question').style.cssText = "display:block"; $("#biaoshi").click(function () { document.getElementById('comment').className = ".ui-tabs .ui-tabs-hide"; document.getElementById('comment').style.cssText = "display:block"; document.getElementById('question').className = ".ui-tabs .ui-tabs-hide"; document.getElementById('question').style.cssText = "display:block"; }) })
相关推荐
hellowzm 2020-07-19
drdrsky 2020-06-04
XuNeely 2020-04-22
lyg0 2020-03-07
tianzyc 2020-02-17
沈宫新 2020-01-02
impress 2020-01-02
89510194 2019-12-31
wwwxuewen 2019-12-19
hlfsunshine 2013-09-02
lcyangcss 2019-11-10
zhangpan 2019-11-09
liushi 2007-11-13
超哥Blog 2007-09-30
libowenhit 2007-09-27
宿舍 2019-10-21
zyhui 2014-11-13
怀抱清风 2017-03-06