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的值

 

posted @ 2019-04-24 14:14  大内密探零零发  阅读(1796)  评论(0编辑  收藏  举报