- 1、本文档共23页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
js的ie和firefox兼容性解决方法(IE and Firefox compatibility solutions for JS)
js的ie和firefox兼容性解决方法(IE and Firefox compatibility solutions for JS)
the 代替 以下以 internet explorer, firefox 代替 mozzila 以 mf
1. document.form.item 问题
(1) 现有问题.
现有代码中存在许多 document.formname.item (itemname 这样的语句, 下运行 不能在 fm )
(2) 解决方法.
改用 document.formname.elements elementname]
(3) 其它
参见 2
2. 集合类对象问题
(1) 现有问题.
现有代码中许多集合类对象取用时使用 (), the 能接受, mf 不能.
(2) 解决方法.
改用 [] 作为下标运算.如: document.forms (formname) 改为 formname document.forms [].
又如: document.getelementsbyname (inputname) (1) (inputname 改为 document.getelementsbyname) [1]
(3) 其它
3. window.event
(1) 现有问题.
使用 window.event 上运行 无法在 mf
(2) 解决方法.
mf 的 event 只能在事件发生的现场使用, 此问题暂无法解决.可以这样变通.
原代码 (可在ie中运行).
input type = button name = somebutton value = 提交 onclick = /
...
script language = javascript
gotosubmit () ()
...
alert (window.event); / / use window.event
...
}
/ td
新代码 (可在ie和mf中运行).
input type = button name = somebutton value = 提交 onclick = /
...
script language = javascript
gotosubmit () (net)
poss = net? net (window.event? window.event: null).
...
alert (vte); / / use net
...
}
/ td
此外, 如果新代码中第一行不改, 与老代码一样的话 (即 gotosubmit 调用没有给参数), 则仍然只能在ie中运行, 但不会出错.所以, 部分仍与老代码兼容 这种方案 dwt.
4. 对象的 id 作为对象名的问题 html
(1) 现有问题
the 中 在 html document 的下属对象变量名直接使用.在 中不能 对象的 id 可以作为 fm.
(2) 解决方法
用 getelementbyid (idname) 代替 idname 作为对象变量使用.
5. 用idname字符串取得对象的问题
(1) 现有问题
在ie中, 利用 eval (idname) 可以取得 id 为 idname 的 html 对象, 在mf 中不能.
(2) 解决方法
用 getelementbyid (idname) 代替 eval (idname).
6. 对象 id 相同的问题 变量名与某 html
(1) 现有问题
在 mf 中, 因为对象 id 不作为 所以可以使用与 html html 对象的名称, 对象 id 相同的变量名.
Not in IE.
(2) solutions
When declaring variables, VaR is added to avoid ambiguity, so that the IE can function properly.
In addition, it is better not to take the same variable name as the HTML object ID to reduce errors.
(3) other
See question 4
7. event.x and event.y problems
(1) existing problems
In IE, the event object has the X and Y attributes, not in the MF.
(2) solutions
In MF, event.x is equivalent to event.pageX. But not in event.pageX IE.
Therefore, the u
您可能关注的文档
- 2013-2014学年度第一学期期末质量调研九年级化学测试题(九下)(2013-2014 semester of the end of the first semester of quality survey, grade nine chemistry test questions (nine below)).doc
- 2012以前情侣应该做的99件事情(你做了几件了)(2012 99 things that lovers should have done before (have you done a couple of things )).doc
- 2012初中物理教学论文 如何提高初中物理教学课堂效率(2012 how to improve the efficiency of junior high school physics teaching in junior high school physics teaching).doc
- 2012广东中考时政热点专题与试题------建设幸福广东,共建共享成果(2012, Guangdong hot topics and examination questions - --- building a happy Guangdong, co construction and sharing of results).doc
- 2013-2014学年第一学期九年级质量检测化学试题(The first semester of the 2013-2014 year, grade nine, quality test chemistry questions).doc
- 2012百度联盟峰会分成预计将超20亿元(2012 Baidu alliance summit divided into 2 billion yuan is expected to exceed).doc
- 2013—2014学年上学期《概论》答案(Answers to the introduction to the last semester of the 2013 - 2014 academic year).doc
- 2013司法考试试题真题 卷四(2013 judicial examination questions Zhenti book).doc
- 2013年5月商务管理综合应用试题及答案_20150512_172352(Comprehensive application questions and answers for business management in May 2013 _20150512_172352).doc
- 2013年8月24日 朝7时のニュース nhk新闻稿(In the morning of August 24, no new 闻稿 NHK news 7).doc
最近下载
- 2025年全国教育工作会议讲话稿(7篇).pdf VIP
- Unit 4【刷语法】although, so that, until引导的状语从句(重点语法提升练)-2022-2023学年八年级英语下册单元模块满分必刷题(人教版).docx VIP
- 会计师事务所承接制度.docx VIP
- JT-T-4-1993公路桥梁板式橡胶支座_PDF解密.docx VIP
- 田阳芒果番茄施肥技术一.ppt VIP
- 湖北省稳派2024-2025学年高二下学期5月联考物理试卷含答案.pdf VIP
- 20S515钢筋混凝土及砖砌排水检查井.pptx VIP
- What time 和when引导的特殊疑问句 频率副词(重点语法提升练)-2023-2024学年七年级英语下册单元模块满分必刷题(人教版).pdf VIP
- 人教版小升初科学考试试题(答案附录).pdf VIP
- 良肢位的摆放.ppt VIP
文档评论(0)