html:
<script>
$(".btn").click(function(){$.color($("#box"),"blue").html("变化")
})
</script>
jQuery: //单独建立js文件存放,然后在html头部导入
jQuery.color=function(obj,value){
$("#box").css("background",value)
return obj
}
html:
<script>
$(".btn").click(function(){</script>
jQuery: //单独建立js文件存放,然后在html头部导入
jQuery.color=function(obj,value){
$("#box").css("background",value)
return obj
}