jQuery插件初级练习4】的更多相关文章

<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/jquery-1.11.0.js" ></script>   //jQuery必备 <script type="text/j…
html: $.kafei.fontsize($("p"),"30px").html("123") jQuery: $.kafei={ fontsize:function(obj,value){ obj.css("font-size",value) return obj }}…
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/jquery-1.11.0.js" ></script> <script type="text/javascript&quo…
html: $("p").log().css("color","red") jQuery: $.fn.extend({ log: function() { var date = new Date() var year = date.getFullYear() var month = date.getMonth() + 1 //月 var data = date.getDate() //日 var hours = date.getHours() v…
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/jquery-1.11.0.js" ></script> <script src="js/time.js">…
html: $("p").fontcolor().html("qaq") jQuery: $.fn.extend({ fontcolor:function(){ this.css("font-size","30px").css("color","blue") return this }})…
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/jquery-1.11.0.js" ></script> <script type="text/javascript&quo…
html: $.font($("p"),"30px").html("变化了") jQuery: $.extend({ font:function(obj,value){ obj.css("font-size",value) return obj            //这里要是不返回值得话,会无法实现连缀 }})…
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="js/jquery-1.11.0.js" ></script> <script src="js/demo11.js" t…
html: <script> $(".btn").click(function(){ $.color($("#box"),"blue").html("变化") }) </script> jQuery:    //单独建立js文件存放,然后在html头部导入 jQuery.color=function(obj,value){ $("#box").css("background…