js switchbutton默認關閉


 

     <div style="margin-bottom:20px">
                            <span style="float: left" data-options="valueField:'id',textField:'text',editable:false">強制拍照:<i style="color: #ff0000"></i></span>
                            <div style="margin-left: 84px">
                                <input class="easyui-switchbutton" id="Photo" name="Pho" >
                            </div>
                        </div>

$("[switchbuttonName='Pho']").switchbutton("uncheck");//默認關閉,效果如下:

$("[switchbuttonName='Pho']").switchbutton("check");//按鈕打開,效果如下:

var Pho = $("#Photo").switchbutton("options").checked;獲取這個switchbutton的值

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM