document.getElementById ("type")  你这里在找一个ID叫TYPE的控件,你的html里根本没有

解决方案 »

  1.   

    谢谢,我在<div id="xuze" style ="display :inline ">   
    的前面加上一行  <label id="type" title ="<%# Eval("type") %>" visible ="false"></label>
    脚本改为function showxuze(){
      var type=document.getElementById ("type").title ;
      if(type==1)
      document.getElementById ("xuze").style .display ="inline";  
      }
    <div id="xuze" style ="display :none ">   
    在前台显示是只有第一行实现了效果,绑定的数据源显示后边的几行虽然是选择题,但还是没有显示出选项,我的函数放在这里执行的<body style="margin: 0px" onload="showTime();showxuze();">