<head>
<script type="text/javascript">
//编写一个名字为color的jquery插件
; (function ($) {
jQuery.fn.extend({
"color": function (value) {
return this.css("color",value);
}
});
})(jQuery);
 
//调用
$(function () {
alert($("body").color("gray"));
});
</script>
</head>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-10-12
  • 2021-12-14
  • 2022-12-23
猜你喜欢
  • 2021-06-30
  • 2021-09-14
  • 2021-07-31
  • 2021-08-04
  • 2022-02-21
  • 2021-11-02
相关资源
相似解决方案