标签:doc element sele click hid cli groupby scrolltop document
JS执行切换frame框架后点击
Window.frame[‘frame路径‘].frame[‘下级frame路径‘].document.getElementById("id").click()
隐藏元素
document.getElementById("id1").style.visibility=‘hidden‘ --隐藏元素
document.getElementById("id1").style.visibility=‘hidden‘ --显示元素
拖动滚动条
document.documentElement.scrollTop=100
document.body.scrollTop=100
window.scroll(x,y)
对表格隐藏某列(JS方式)
var res=document.querySelectorAll("[field=‘groupby‘]");
for(var i=0;i<res.length;i++){
var node = res[i];
node.style.display=‘none‘;
}
注:
node.style.display = ‘none‘ --会腾出页面位置
node.style.visibility = ‘hidden‘ --不会腾出位置,元素位置会出现一块空白
标签:doc element sele click hid cli groupby scrolltop document
原文地址:http://www.cnblogs.com/pengwue/p/7684574.html