All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Visual C++ 6.0教程:条件编译指令
,2.0,中快速实现单点登陆_[Asp.Net教程]
精华:AJAX开发简略 (第二部分)_[AJAX教程]
在Asp.Net2.0中可以方便的访问配置文件web.config_[Asp.Net教程]
一步步教你配置SQL SERVER合并复制(三)配置Distributor_[SQL Server教程]
PHP安全《PHP Security》_[PHP教程]
使用javascript脚本控制网页Table的显示隐藏_JavaScript技术_编程技术
asp.net(C#)海量数据表高效率分页算法(不使用存储过程)_[Asp.Net教程]
GridView,的各种用法(4)_[Asp.Net教程]
新瓶旧酒ASP.NET,AJAX(7),-,客户端脚本编程(Sys命名空间下的类)_[Asp.Net教程]
Reading number is top 10 pictures
NeedWallpaper1
The money of more than 100 countries and regions19
这张图有两句话,你看出来了吗?
Sora aoi possession of boudoir1
南昌铁路局攸县车站125户铁路职工微利房终成骗局
Group of female porn in 《westwards》, uninhibited woman threatened to not the bottom line
BingBingFan apple dew point photo gallery4
29 the belle stars after bath figure5
美洲杯宝贝的雨中风情1
Kim jong il's mistress, national beauty JinYuJi actor1
Download software ranking
Unix video tutorial18
Ashlynn Video4
电脑知识及技巧大合集
Take off clothes to survival
The hero
小黑猫大战两米大花蛇
jdk1.5
豪门浪荡史
Sora aoi, the maid, students' uniforms
Boxer's Top ten classic battle2
delv published in(发表于) 2013/12/31 6:51:06 Edit(编辑)
网页制作兼容Mozilla必须知道的知识_JavaScript技术_编程技术

网页制作兼容Mozilla必须知道的知识_JavaScript技术_编程技术

网页制作兼容Mozilla必须知道的知识_JavaScript技术_编程技术-你的首页-uuhomepage.com
































































































































IEMozilla说明
document.all(id)document.getElementById(id)
document.alldocument.getElementsByTagName("*")
document.body.clientHeight(clientWidth)根据HTML的DTD而定方能得到准确值。window.innerHeight(innerWidth)根据HTML的DTD而定方能得到准确值。
opacity(aplha=20)MozOpacity="0.2"可参看我的blog这篇文章
event.clientY(clientX)event.pageY(pageX)
event.keyCodeevent.which
event.srcElementevent.target
window.external.AddFavorite('never-online.net', "never-online'website"); window.sidebar.addPanel('never-online.net', "never-online'website", "");
event.clientY(clientX)event.pageY(pageX)
(DHTML事件-滚轮事件)onmousewheelDOMMouseScroll可参看我的blog这篇文章
window.showModalDialogwindow.open(url, "name", "modal=yes")
createPopup()xul
htc控件xbl绑定
filter滤镜只支持alpha(透明度,部分可通过clip来模拟)
obj.setCapture()window.captureEvents(Event.eventType)
obj.attachEvent(type, listener)obj.addEventListener(type, listener, useCapture)
obj.detachEvent(type, listener)obj.removeEventListener(type, listener, useCapture)
脚本预解释执行
o={ <br/>foo: function(){ <br/>alert("never-online"); <br/>} <br/>}; <br/>with (o) {<br/>bar();<br/>function bar(){ <br/>alert("never-online");<br/>} <br/>foo(); <br/>}<br/>
上面的代码成功输出never-online
脚本顺序执行。<br/>o={ <br/>foo: function(){ <br/>alert("never-online"); <br/>} <br/>}; <br/>with (o) {<br/>bar();<br/>function bar(){ <br/>alert("never-online");<br/>} <br/>foo(); <br/>}<br/>
报错bar未定义
解决方法有很多种,请参见我这里的评论或者这篇文章
支持Webdings字体不支持Webdings字体
insertAdjacentHTML, insertAdjacentElement方法本身不支持,但可通过insertBefore或通过Range实现可参见我这篇文章的代码
不支持读写器__defineSetter(Getter)__
不支持支持对Element,EVENT等对象的prototype模式支持
不支持对节点有nodeType常量属性
new ActiveXObject("MSXML2.XMLHTTP")或更高版本的ProgIdXMLHttpRequest对象
设置类似style.top=20这样的高度时,可不使用单位设置类似style.top=20+'px'这样的高度时,必须使用单位,否则无效
CSS的类名,不区分大小写(大小写不敏感)CSS的类名,区分大小写(大小写敏感)如:.myCss和.mycss类名就是不相同的
冒泡事件event.cancelBubble=trueevent.stopPropagation()(需要传递event事件)
parentElement默认不支持,但可以利用Mozilla特性模拟
HTMLElement.prototype.__defineGetter__("parentElement", <br/>function () {<br/>if (this.parentNode == this.ownerDocument) return null;<br/>return this.parentNode;<br/>});<br/>
无空白节点因为Mozilla下NodeType下定义有12种节点属性,所以要去除空白的节点方能得到预期值
 var notspace = /\S/;<br/>function cleanWhitespace(node) {<br/>for (var x=0; x<node.childNodes.length; x++) {<br/>var child = node.childNodes[x];<br/>if ((child.nodeType == 3) && (!notspace.test(child.nodeValue))) {<br/>node.removeChild(node.childNodes[x]); x--;<br/>}; if(child.nodeType == 1) { cleanWhitespace(child); }<br/>}<br/>}<br/>
CSS padding宽度并不在offset偏移坐标之内CSS padding宽度默认是在offset偏移坐标之内,可用-moz-box-sizing:border-box来设置即可基本与IE相同可参见我这篇文章的代码
js动态加载xslt文件将xml转化成HTML,IE可用xmldoc.transformNode(xslDocument)方法Mozilla中相对麻烦一些,要经过几道工序XSLTProcessor对象,transformToFragment或其它方法




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.