- 1、本文档共14页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
onbeforeunload与a标签在IE中的冲突bug(国外英文资料)
onbeforeunload与a标签在IE中的冲突bug(国外英文资料)
Onbeforeunload is the window of an event, the current Firefox, IE all support, is mainly used to prompt the user whether to leave the page, usually in some of the more important data before submitting, prevent users from wrong operation cause data loss. Typical applications such as gmail, when writing an email, will be prompted if you refresh the page or close the page.
But clicking on a TAB in IE will also trigger onbeforeunload events. And the href writes javascript: void (0) doesnt work, and it wont happen in Firefox. So the information was reintroduced to the onbeforeunload event:
A tag triggers the sequence of events
The running relationship between onclick, onbeforeunload and href is this: onclick onbeforeunload href, and we can stop onbeforeunload by some means. In the Internet explorer browser, the onbeforeunload event is not triggered if the href is #.
How to prevent onbeforeunload
At the same time as Ajax, add an onclick event to a tag, so onclick runs before onbeforeunload and then return false
Bypass onbeforeunload href directly
In conjunction with the onclick event, we can bypass the onbeforeunload direct href, and the following code can bypass the onbeforeunload and execute the href:
Var a = 1;
Window. Onbeforeunload = function ()
{
If (a) alert ( onbeforeunload event broke out! )
}
As long as we add a = 0 in the onclick event Ok ~
Image rotation code with digital button switch
New visitors XKER.COM time: 2010-06-25:1
Through the new website editing test, you can use it normally, very good code.
The code is shown below (the code is saved to the page) :
TABLE width = height = 135 border = 0 cellPadding = 0 cellSpacing = 0,
The TBODY
TR
TD
The STYLE type = text/CSS
# imgTitle {
FILTER: ALPHA (opacity = 70); LEFT: - 5 px; OVERFLOW: hidden; POSITION: relative; The TEXT - ALIGN: left
}
# imgTitle_up {
LEFT: 0 px; HEIGHT: 1 px; The TEXT - ALIGN: left
}
# imgTitle_down {
LEFT: 0 px; The TEXT - ALIGN: right
}
. I
文档评论(0)