更新时间:2020-08-01 21:13:17
更新说明:操作按钮方式一致, 如绑定事件等。
具体用法如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | $(function() { //单选 //selected: 默认选中值 * type: 0 或者 1 两种样式 $("input[name='sex']").richradio(); $("input[name='sex2']").richradio(); $("input[name='sex3']").richradio({ selected: "女" }); $("input[name='sex4']").richradio({ selected: "未知", type: "1" }); / /复选 // allBtn:是否出现全选按钮,默认 false // * checkAll: 全选,默认false // * selected: 默认选中值 // * type: 0 或者 1 两种样式 $("input[name='xingqu']").richcheckbox(); $("input[name='xingqu2.aa']").richcheckbox({ allBtn: true, checkAll: true }); $("input[name='xingqu3']").richcheckbox({ allBtn: true }); $("input[name='xingqu4']").richcheckbox({ allBtn: true, selected: "2,4", type: 1 }); //下拉框 //type: single(单选,默认),multi(多选) * selected: 默认选中值 * width: 宽度 $("#mySelect").richselect(); $("#mySelect2").richselect({ selected: "搜狐" }); $("#mySelect3").richselect({ type: "multi", placeholder: "hello" }); $("#mySelect4").richselect({ type: "multi", selected: "百度,阿里巴巴", width: "300px" });});//获取单选按钮选中值alert($("input[name='sex2']").getRadioVal());//获取复选按钮选中值,数组格式alert($("input[name='xingqu4']").getCheckboxVal()); //获取下拉框选中值,数组格式alert($("#mySelect4").getSelectVal()); |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com