扩展接口

来源:互联网 发布:java脚本语言教程 编辑:程序博客网 时间:2024/06/10 05:42
jQuery.fn.extend({check: function() {return this.each(function() { this.checked = true; });},uncheck: function() {return this.each(function() { this.checked = false; });}});$(function(){$("input[type=checkbox]").check().css("border","solid 1px red");$("input[type=radio]").uncheck().css("border","solid 1px blue");});

0 0
原创粉丝点击