zoukankan      html  css  js  c++  java
  • js中disabled属性

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    <html>

     <head>  

    <title> New Document </title>  

    <meta name="Generator" content="EditPlus">  

    <meta name="Author" content="">  

    <meta name="Keywords" content="">  

    <meta name="Description" content="">  

    <script>     

    function  selectAll(){         

    for ( var  i = 0 ; i <document.getElementById("td1").childNodes.length; i ++ ){             

    var  obj  =  document.getElementById("td1").childNodes[i];             

    if (obj  &&  obj.type  &&  obj.type  ==   "checkbox" )

    obj.disabled  = true   ;        

    }    

    }

    </script>  

    </head>

     <body>  

    <table  border =1  cellpadding =0  cellspacing =0  width =300>     

    <tr>         

    <td  id ="td1">             

    <input  type ="button"  value = click  onclick ="selectAll()"><br>             

    <input  type ="checkbox"> 1 <br>             

    <input  type ="checkbox"> 2 <br>             

    <input  type ="checkbox"> 3 <br>             

    <input  type ="checkbox"> 4 <br>             

    <input  type ="checkbox"> 5 <br>             

    <input  type ="checkbox"> 6 <br>             

    <input  type ="checkbox"> 7 <br>         

    </ td>     

    </ tr>     

    <tr>         

    <td  id =td2>             

    <input  type ="checkbox"> 11 <br>             

    <input  type ="checkbox"> 12 <br>         

    </ td>     

    </ tr>

    </ table>  

    </body>

    </html>

  • 相关阅读:
    es 报错cannot allocate because allocation is not permitted to any of the nodes
    linux下获取软件源码包 centos/redhat, debian/ubuntu
    windows假死原因调查
    k8s-calico
    helm使用
    docker网络模式
    4、formula 法则、原则、数学公式
    powershell自动添加静态IP
    WDS部署Windows server2012初试
    2、puppet资源详解
  • 原文地址:https://www.cnblogs.com/bailuobo/p/2545030.html
Copyright © 2011-2022 走看看