日期:2014-05-16 浏览次数:20386 次
function listProject(ss){
var dom = document.getElementById("xs_"+ss);
if(dom){
dom.style.display="";
}
}
<!doctype html>
<!-- Saved from html5snippet.net -->
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<style type='text/css'>
</style>
<script type='text/javascript'>
function listProject(ss)
{ xzd = "xs_"+ss//xzd全局变量
alert(xzd)
var aaa = xzd;//没用的代码,去掉或者注释掉
var sss="1";//sss局部变量
sss = xzd;//这句是干什么的?
document.getElementById(sss).style.display="none";
}
window.onload = function() {
listProject(1);
}
</script>
</head>
<body>
<div id="xs_1">Here</div>
</body>
</html>