一款非常简单实用的jQuery表单元素单选框、复选框、下拉框美化插件,本实例有很多种美化效果,具体请查看演示。
js代码
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/jquery.richUI.min.js"></script>
<script type="text/javascript" src="js/jquery.browser.min.js"></script>
<script type="text/javascript">
$(function() {
//单选
/*
* selected: 默认选中值
*/
$("input[name='sex']").richradio();
$("input[name='sex2']").richradio();
$("input[name='sex3']").richradio({selected:"2"});
//复选
/*
* allBtn:是否出现全选按钮,默认 false
* checkAll: 全选,默认false
* selected: 默认选中值
*/
$("input[name='xingqu']").richcheckbox();
$("input[name='xingqu2']").richcheckbox({allBtn:true, checkAll:true});
$("input[name='xingqu3']").richcheckbox({allBtn:true});
$("input[name='xingqu4']").richcheckbox({allBtn:true, selected:"2,4"});
//下拉框
/**
* type: single(单选,默认),multi(多选)
* selected: 默认选中值
* width: 宽度
* placeholder: 提示文字
*
**/
$("#mySelect").richselect();
$("#mySelect2").richselect({selected:"3"});
$("#mySelect3").richselect({type:"multi", placeholder:"hello"});
$("#mySelect4").richselect({type:"multi", selected:"4,5", width:"300px"});
});
</script>
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791