- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
ie和firefox兼容(Ie compatible with Firefox)
ie和firefox兼容(Ie compatible with Firefox)
IE and Firefox are compatible,.Txt and handsome men shake hands, talk to deep men, talk more with successful men, and live with ordinary men. Today, when testing the code, I found a lot of IE running Ajax, but it was wrong in FF.
The incompatibility and unifying methods of IE and Firefox (Firefox) in JavaScript are summarized below:
1. compatible with Firefox outerHTML, no outerHtml method in FF.
If (window.HTMLElement) {
HTMLElement.prototype.__defineSetter__ (outerHTML, function (sHTML) {
VaR, r=this.ownerDocument.createRange ();
R.setStartBefore (this);
Var df=r.createContextualFragment (sHTML);
This.parentNode.replaceChild (DF, this);
Return sHTML;
});
HTMLElement.prototype.__defineGetter__ (outerHTML, function () {
Var attr;
Var attrs=this.attributes;
Var str= +this.tagName.toLowerCase ();
For (VaR i=0; iattrs.length; i++) {
Attr=attrs[i];
If (attr.specified)
Str+= , +attr.name+=, +attr.value+;
}
If (... This.canHaveChildren)
Return str+ ;
Return str+ +this.innerHTML+ / +this.tagName.toLowerCase (+) ;
});
HTMLElement.prototype.__defineGetter__ (canHaveChildren, function () {
Switch (this.tagName.toLowerCase ()) {
Case area:
Case base:
Case BASEFONT:
Case col:
Case frame:
Case HR:
Case img:
Case br:
Case input:
Case isindex:
Case link:
Case meta:
Case param:
Return false;
}
Return true;
});
}
2. set class object problem
Description: IE, you can use (or) [] gets a collection of objects; Firefox, can only use [] gets a collection object.
Solution: unified use [] gets a collection object.
3. custom attribute issues
Explanation: under IE, you can use custom properties to obtain custom attributes, or you can use getAttribute () to get custom attributes; under Firefox, you can only use getAttribute () to obtain custom attributes
Solution: unified access to custom attributes through getAttribute ()
4.eval (idName) problem
Description: IE, you can use Eval (idName) or getElementById (idName) to obtain ID for the idName HTML o
您可能关注的文档
- 2011年青浦区高三化学一模试卷(附答案)(Qingpu District in 2011 the first mock exam papers of Senior Chemistry (with answers)).doc
- 2011微博营销发展方向漫谈(2011, micro-blog marketing development direction).doc
- 2011湖南衡阳物理试题(2011 Hunan Hengyang physics examination).doc
- 2011总结(2011 summary).doc
- 2011申论热点剖析人肉搜索案暴露民事立法之不足(Analysis on 2011 hot spots human flesh search case exposed a lack of civil legislation).doc
- 2011福建高考满分作文(2011 Fujian college entrance examination scores).doc
- 2011考研必备考研英语每年都出现的单词(2011, postgraduate entrance examination must English for postgraduate entrance examination every year).doc
- 2011护士资格考试资料(2011 nurse qualification examination data).doc
- 2011考研生应做好生理和心理上的双重准备(2011, postgraduate students should do both physical and psychological preparation).doc
- 2011锦城教育(2011 Jincheng Education).doc
- iis apache+php+mysql+zend optimizer+phpmyadmin安装配置(IIS,Apache + PHP + MySQL + Zend Optimizer + phpMyAdmin安装配置).doc
- imageurl数据绑定(imageurl数据绑定).doc
- ie和firefox浏览器css兼容性技巧(IE and Firefox browser CSS compatibility skills).doc
- go for it 七年级(下)期末质量检测英语试卷(去吧七年级(下)期末质量检测英语试卷).doc
- ie6.0、ie7.0 与firefox css兼容的解决方法(IE6.0, IE7.0 and Firefox CSS compatible solutions).doc
- ipo新制度下如何打新 - 东方财富网(Under the new IPO system, how to hit the new - Eastern wealth network).doc
- ip等级(ip degree).doc
- ip地址异形手记(IP address special notes).doc
- it公司工资情况(It company payroll).doc
- it决策,九招搞定(It decision, nine trick to get).doc
文档评论(0)