Goodsu

导航

 

2015年8月7日

摘要: function format(string) {var args = arguments;var pattern = new RegExp("%([1-" + arguments.length + "])", "g");return String(string).replace(pattern, ... 阅读全文
posted @ 2015-08-07 23:33 Goodsu 阅读(393) 评论(0) 推荐(0)
 
摘要: Array.prototype.slice.call(arguments)话说可以通过call()来让arguments来继承array的slice()方法。可是为何使用arguments.slice(1)会报错,而这样使用Array.prototype.slice.call(arguments,1... 阅读全文
posted @ 2015-08-07 21:43 Goodsu 阅读(171) 评论(0) 推荐(0)
 
摘要: 学习js的过程中,根据知识点编写一些code进行测试,以便检验。这段程序使用了以下知识点:1.regexp,对数据进行模式匹配2.使用location对象进行页面跳转。3.cookie/localstorage等本地存储的使用 用户名: 密码:submit1.正则表达式(参考,h... 阅读全文
posted @ 2015-08-07 17:11 Goodsu 阅读(301) 评论(0) 推荐(0)
 
摘要: 最近在使用 window的location时碰到一个无法跳转页面的问题,后来在location语句后加了一条这样的语句:window.event.returnValue = false;然后竟然可以正常跳转了,具体原因还在学习中,稍后更新。 tel: su... 阅读全文
posted @ 2015-08-07 09:40 Goodsu 阅读(1242) 评论(0) 推荐(0)