摘要: function getParam(url){ var x={}; var pattern=/(\w+)=(\w+)/ig; url.replace(pattern, function(a,b,c){ x[b]=c; }); console.log(x["name"]); //测试用 name } 阅读全文
posted @ 2021-03-14 20:58 Will_the_Wizard 阅读(273) 评论(0) 推荐(0)
摘要: 要求:一个once函数,使传入的函数只执行一次 代码: function once(fun){ var tag=true; return function(){ if(tag){ tag=false; fun(); } } } 测试: function gou(){ document.write(" 阅读全文
posted @ 2021-03-03 20:19 Will_the_Wizard 阅读(886) 评论(0) 推荐(0)
摘要: 直接上代码 div { width:0px; height:0px; border-top:0 solid red; border-right:300px solid transparent; border-bottom:300px solid blue; border-left:300px sol 阅读全文
posted @ 2021-03-03 14:26 Will_the_Wizard 阅读(42) 评论(0) 推荐(0)