2020年1月12日

js对象(三)

摘要: js使用祖先元素 //js的祖先元素 Function Function.prototype.addMethod=function(name,fn){ this[name]=fn; } var methods = new Function(); methods.addMethod("checkUse 阅读全文

posted @ 2020-01-12 22:26 孤灯引路人 阅读(103) 评论(0) 推荐(0) 编辑

js真实对象(二)

摘要: //如果这样写不是真正的对象 var checkOut = function(){ return { checkName:function(){ console.log(1111); }, checkmail:function(){ console.log(22222); } }; } var a 阅读全文

posted @ 2020-01-12 21:33 孤灯引路人 阅读(133) 评论(0) 推荐(0) 编辑

js基础(一)

摘要: $(document).ready(function(){ //这样js代码太繁琐,不利于维护扩展 // function checkName(){ // cnsole.log(1); // } // function checkEmail(){ // console.log(2); // } // 阅读全文

posted @ 2020-01-12 20:05 孤灯引路人 阅读(109) 评论(0) 推荐(0) 编辑

导航