随笔分类 - js
纯JavaScript 无jquery等
摘要:var currentPageUrl = ""; if (typeof this.href === "undefined") { currentPageUrl = document.location.toString().toLowerCase(); } else { currentPageUrl = this.href.toString().toLowerCase(); } ...
阅读全文
摘要:设为首页: 加入收藏夹:
阅读全文
摘要:获取cookie:
阅读全文
摘要:function isDigit(value) { var patrn = /^[0-9]*$/; if (patrn.exec(value) == null || value == "") { return false } else { return true } }
阅读全文
摘要:还原:
阅读全文
摘要:function getHost(url) { var host = "null"; if(typeof url == "undefined"|| null == url) { url = window.location.href; } var regex = /^\w+\:\/\/([^\/]*).*/; var match = url....
阅读全文
摘要:function cutstr(str, len) { var temp; var icount = 0; var patrn = /[^\x00-\xff]/; var strre = ""; for (var i = 0; i < str.length; i++) { if (icount < len - 1) { ...
阅读全文

浙公网安备 33010602011771号