JavaScript
sartner
这个作者很懒,什么都没留下…
展开
-
JavaScript
//获取父窗口中的变量window.opener.self.变量名原创 2011-07-06 14:49:52 · 367 阅读 · 0 评论 -
阻止默认事件
treePanel.on("contextmenu",function(node, event){ event.preventDefault(); //阻止默认事件 _tempNode=node;原创 2011-09-29 09:29:42 · 535 阅读 · 0 评论 -
JS小工具
//1. JS获得应用名 function getContextPath() { var contextPath = document.location.pathname; var index =contextPath.substr(1).indexOf("/"); contextPath = contextPath.substr(0,index+1); dele原创 2012-06-01 15:55:56 · 570 阅读 · 0 评论 -
JS 添加/删除事件监听
var btn; //1. 字符串脚本 btn.onclick = Function("alert('hello');"); //2. 方法 btn.onclick = function () { alert("hello"); }; //3. 方法引用 btn.onclick = myAlert; function myAlert() { al原创 2012-06-01 17:06:36 · 7475 阅读 · 0 评论