|
楼主 |
发表于 2004-6-17 14:00:47
|
显示全部楼层
re
[php]
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="rogId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Click here</title>
<SCRIPT language=JavaScript>
function dispBranch(id1,id2) {
if (document.getElementById){
var objDiv = document.getElementById ("divID_" + id1);
var objDiv2 = document.getElementById ("divID_"+id2);
if (objDiv.style.display == "none"){
objDiv.style.display = "block";
objDiv2.style.display = "none";
}else if (objDiv.style.display == "block"){
objDiv.style.display = "none";
objDiv2.style.display = "block";
}else{
objDiv.style.display = "block";
}
}else{
return true;
}
}
</SCRIPT>
</head>
<body>
<DIV id="divID_1" style="display: block; width:923; height:32" >
<button type="button" value="" onclick="javascript:dispBranch(0,1);return true">click here</button>
</DIV>
<br>
<DIV id="divID_0" style="display: none; width:923; height:32">
<form method="OST" action="--WEBBOT-SELF--">
<textarea rows="10" name="S1" cols="20"></textarea>
<input type="button" value="点我">
</form>
</DIV> </body>
</html>
[/php]
帮测试一下!为什么我的浏览器解析js就是有问题!!! |
|