加载页面执行
js里加window.onload=function(){
var pointTsrNew = document.getElementById("pointTsrNew");
var rollGroupTd = document.getElementById("rollGroupTd");
var rollGroup = document.getElementById("rollGroup");
var tsrPoint = document.getElementById("tsrPoint");
var roleIdNew = document.getElementById("roleIdNew").value;
var trHide = document.getElementById("trHide");
var trHideNo = document.getElementById("trHideNo");
var trHide1 = document.getElementById("trHide1");
var trHideNo1 = document.getElementById("trHideNo1");
var roleParentId = document.getElementById("roleParentId");
var roleId = document.getElementById("roleId");
if(roleParentId.value != "0" && roleParentId.value != "1"){
trHide.style.display="none";
trHideNo.style.display="none";
trHide1.style.display="none";
trHideNo1.style.display="none";
}
if(roleIdNew!="3"){
pointTsrNew.style.display="none";
tsrPoint.style.display="none";
rollGroupTd.style.display="none";
rollGroup.style.display="none";
}
}