JS
sahalacn
这个作者很懒,什么都没留下…
展开
-
util.js
//去左右空格 String.prototype.trim = function(){ return this.replace(/(^s*)|(s*$)/g, ""); } String.prototype.lTrim = function(){ return this.replace(/(^s*)/g, ""); } String.prototype.rtrim = funct原创 2012-05-03 17:53:26 · 260 阅读 · 0 评论 -
js小助手
//复制功能 window.clipboardData.setData("Text","复制内容"); //回车按键 document.onkeydown = function(e){ if(!e) e = window.event;//火狐中是 window.event if((e.keyCode || e.which) == 13){原创 2012-05-03 18:03:09 · 244 阅读 · 0 评论 -
div悬浮提示框
var tip = { $ : function(ele) { if (typeof (ele) == "object") return ele; else if (typeof (ele) == "string" || typeof (ele) == "number")原创 2012-07-03 14:25:26 · 1148 阅读 · 0 评论