easyUI樣式之easyui-switchbutton

HTML文件

<tr>
     <th>是否發送短信:</th>
      <td>
       <input id="sendTxt" name="sendTxt" class="easyui-switchbutton" onText="是" offText="否" width="100px" checked="checked"/>
       </td>
</tr>

 

JS文件

初始化:
$("[switchbuttonName='sendTxt']").switchbutton("check");

 

傳遞值
var param = {
            sendTxt : $("[switchbuttonName='sendTxt']").switchbutton("options").checked,
        };

 

效果圖:

 

 

 

 

以上!!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章