摘要:
var nodes = document.getElementsByTagName("script");var node = nodes[nodes.length - 1];var src = document.querySelector ? node.src : node.getAttribute... 阅读全文
摘要:
对于我来说,在编写javascript的代码的时候,对于undefined的判定会写成:function isUndefined(para) { return (para === undefined || typeof para == "undefined");}除此之外看到另外一种判定方法:... 阅读全文
摘要:
在阅读《Javascript框架设计》3.1 字符串扩展与修复中对于repeat的方法提供了八个版本,在此将其中较优的进行标记,仅仅供学习使用:;;;(function() { function repeat(target, n) { var s = target, total ... 阅读全文