javascript技术
文章平均质量分 50
LIUJIMMY
这个作者很懒,什么都没留下…
展开
-
js修改onclick动作的四种方式
第一种:button.onclick = Function("alert(hello);");第二种:button.onclick = function(){alert("hello"); };第三种:button.onclick = myAlert; function myAlert(){ alert(原创 2009-09-06 08:38:00 · 12041 阅读 · 0 评论 -
js动态添加删除表格行
增加Table行 // Example: obj = findObj("image1");function findObj(theObj, theDoc){ var p, i, foundObj; if(!theDoc) theDoc = document; if( (p = theObj.indexOf("?"原创 2009-09-06 08:40:00 · 5688 阅读 · 5 评论 -
去掉链接时的虚框
去掉链接时的虚框只要在你的样式表中加入以下代码,就可以去掉链接时烦的的虚框a,area { blr:expression(this.onFocus=this.blur()) } /* for IE */:focus { -moz-outline-style: none; } /* for Firefox */原创 2009-10-01 16:58:00 · 492 阅读 · 0 评论 -
Ext.apply、 Ext.applyIf和Ext.extend
Ext.apply、 Ext.applyIf和Ext.extend:2008年07月25日 星期五 10:48Ext.apply、 Ext.applyIf和Ext.extend:Ext.apply(obj, config, [defaults]) 将config对象的所有属性都复制到另一个对象obj上, 第三个参数defaults可以用来提供默认值, 不过通常指用前两个参数就够了。原创 2010-04-22 17:01:00 · 1051 阅读 · 0 评论 -
javascript 中call与apply区别
1.call方法官方(JavaScript手册):调用一个对象的一个方法,以另一个对象替换当前对象。call([thisObj[,arg1[, arg2[, [,.argN]]]]])参数thisObj 可选项。将被用作当前对象的对象。arg1, arg2, , argN 可选项。将被传递方法参数序列。 说明call 方法可以用来代替另一个对象原创 2010-04-27 10:43:00 · 782 阅读 · 0 评论 -
js获取当前应用名
<br />document.location.pathname <br /><br /> function getContextPath() { <br /> var contextPath = document.location.pathname; <br /> var index =contextPath.substr(1).indexOf("/"); <br /> contextPath = contextPath.substr(0,index+1); <br />原创 2010-07-27 11:14:00 · 4954 阅读 · 0 评论 -
js获取上下文路径
<br />function getContextPath() { var contextPath = document.location.pathname; alert(contextPath+"=====") var index =contextPath.substr(1).indexOf("/"); contextPath = contextPath.substr(0,index+1); delete index; return contextPath;}原创 2011-04-16 20:21:00 · 5217 阅读 · 0 评论