注册 登录
编程论坛 ASP技术论坛

如何告诉游览器,我已选择该项!!!

ysf0181 发布于 2010-05-21 16:50, 390 次点击
<input type="radio" name="tongsheng" value="是" onClick="select1(this.value)" <%if instr(rs("tongsheng"),"是")then%>checked<%end if%>>
                  是
                 <input name="tongsheng" type="radio" value="否" onClick="select1(this.value)" <%if instr(rs("tongsheng"),"否")then%>checked<%end if%>>
                  否


<body  onLoad="select1(formTec.tongsheng.value)">



3 回复
#2
ysf01812010-05-21 17:02
    我从数据库读取数据,在 读取为 是时,有个隐藏的窗口会出来,这么隐藏窗口默认是隐藏的。

怎么通过javacript 打开这个隐藏呢?

   其实,就是告诉游览器,我已选择该项,是程序自己选的。
#3
gupiao1752010-05-21 18:07
你想要的效果是否想用radio的是否被选中来控制层的显示??类似这样的代码如下:
<html>
<head>
<style>
div
{

}
</style>
<script type="text/javascript">
function ha()
{
var d=document.getElementById("div1").style.display;
document.getElementById("div1").style.display=(d=='none')?'block':'none';
}
</script>
</head>
<body>
<div id="div1" style="position:absolute;width:300px;height:300px;display:none;background:red;top:200px;left:200px;">dddd</div>
<input type="button" value="出来吧" onclick="ha()">
</body>
</html>

#4
ysf01812010-05-22 18:32
其实  onLoad="select1(formTec.tongsheng.value)"  就可以解决了。
1