会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Will_the_Wizard's BLog
博客园
首页
新随笔
联系
订阅
管理
2021年3月14日
get url里的参数,正则匹配等号前后方案
摘要: 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)
2021年3月3日
js函数只执行一次once
摘要: 要求:一个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)
css border实现三角形
摘要: 直接上代码 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)
公告