当前位置: 代码迷 >> 综合 >> document.write应用...
  详细解决方案

document.write应用...

热度:59   发布时间:2024-01-16 19:04:46.0
<script language="javascript">
              var state_id = "<%=state_id%>";
          if(state_id==1)
                      document.write('<input type="radio" name="state" checked value="1" >未用 ');
              else
                      document.write('<input type="radio" name="state" value="1">未用 ');    
              if(state_id==2)
              document.write('<input type="radio" name="state" checked value="2" checked >预占 ');
          else
              document.write('<input type="radio" name="state" value="2"  >预占 ');
          if(state_id==3)
              document.write('<input type="radio" name="state" checked value="3" checked >实占 ');
          else
              document.write('<input type="radio" name="state" value="3"  >实占 ');
          if(state_id==4)
              document.write('<input type="radio" name="state" checked value="4" >预留 ');
          else
              document.write('<input type="radio" name="state" value="4" >预留');
          if(state_id==5)
              document.write('<input type="radio" name="state" checked value="5" checked >坏&nbsp;&nbsp;');
          else
              document.write('<input type="radio" name="state" value="5"  >坏&nbsp;&nbsp;');
          if(state_id==6)
              document.write('<input type="radio" name="state" checked value="6" >复接 ');
          else
              document.write('<input type="radio" name="state" value="6" >复接');  
                </script>
  相关解决方案