posts - 0,comments - 0,trackbacks - 0

<html>
<head>
<title>测试</title>
</head>
<body>
<form name="form1" method="get" action="">
        <table width="70%" border="1" cellspacing=0>
          <tr>
            <td >是否刷新squid</td>
            <td>
              使用
              <input type="radio" name="refresh_flag4" value="1" onclick="tr_1.style.display=''">
              &nbsp;&nbsp;&nbsp;
              不用
              <input type="radio" name="refresh_flag4" value="0" checked onclick="tr_1.style.display='none'">
            </td>
          </tr>

 <tr  id=tr_1>
        <td width="32%" bgcolor="#CCCCCC" height="32">squid设备类型</td>
        <td ><input type='radio' name='squid_ref_flag'  value='1' >测试</td>
        <td ><input type='radio' name='squid_ref_flag'  value='2' >测试</td>
 </tr>
</table>
</form>
</body>
<script language="javascript" type="text/JavaScript">
function checksquidflag()
{
  var obj = document.all("squid_ref_flag");
  //alert(obj);
  if(document.form1.refresh_flag4[1].checked){
      if(obj){
          for(i=0;i<obj.length; i++){
              obj[i].disabled = false;
              }
               obj[0].checked=true;
      }
  }
}
function init()
{
document.all["tr_1"].style.display="none";
}
init();
checksquidflag();
</script>
</html>

posted on 2006-11-28 17:24 yxw 阅读(1430) 评论(0)  编辑  收藏 所属分类: javascript

只有注册用户登录后才能发表评论。


网站导航: