zoukankan      html  css  js  c++  java
  • JQ判断按钮,复选框是否选中

                 var oRdoValue=$("#Radio1").is (":checked")?"男":"女"; //获取单选框按钮值
                 var oChkValue=$("#Checkbox1").is (":checked")?"已婚":"未婚";//获取复选框按钮值
    

      

            性别:<input id="Radio1" name="rdoSex" type="radio" value="男" />男
                  <input id="Radio2" name="rdoSex" type="radio" value="女" />女<br />
            婚否:<input id="Checkbox1" type="checkbox" />
    

      

                            <td align="center" valign="middle">
                                <input type="checkbox" id="selall" onclick="doCheckClick()"/>全选
                            </td>
     
    
                                    <input name="simUnitCodeList" type="checkbox" value='EA04' 
                                     />&#20013;&#36135;&#33322;
                                    
                                
                                    <input name="simUnitCodeList" type="checkbox" value='EA08' 
                                     />&#23665;&#19996;
                                    
                                
                                    <input name="simUnitCodeList" type="checkbox" value='EA06' 
                                     />&#27743;&#35199;
                                    
                                
                                    <input name="simUnitCodeList" type="checkbox" value='EA16' 
                                     />&#22235;&#24029;
                                    
                                
                                    <input name="simUnitCodeList" type="checkbox" value='EA17' 
                                     />&#19978;&#33322;
                                    
                                
                                    <input name="simUnitCodeList" type="checkbox" value='EA12' 
                                     />&#35199;&#21271;
                                    
            function doCheckClick(){
                $('input[name="simUnitCodeList"]').attr("checked", $("#selall").is (":checked"));
            }

                   原文地址:http://jxdwuao.iteye.com/blog/981567

  • 相关阅读:
    wireshark安装
    高效使用搜索引擎
    MFC 网络编程 -- 总结
    MFC Grid control 2.27
    A Popup Progress Window
    Showing progress bar in a status bar pane
    Progress Control with Text
    Report List Controls
    第三方
    CBarChart柱形图类
  • 原文地址:https://www.cnblogs.com/zxyun/p/4462839.html
Copyright © 2011-2022 走看看