Home  >  Article  >  Web Front-end  >  Clicking on element A to trigger an event on element B will be recognized as element A under IE8_javascript skills

Clicking on element A to trigger an event on element B will be recognized as element A under IE8_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:37:341022browse
var menuUrl = $(eventSrc).attr("navUrl"); 
// if (menuUrl == undefined) {//兼容IE8的$(eventSrc)识别错误,取第一个 
// menuUrl = $("#left_menu-small li:first a").attr("navUrl"); 
// } 
var browser = GetIEVersion(); 
if (browser == "IE8") {//兼容IE8的$(eventSrc)识别错误,取第一个 
menuUrl = $("#left_menu-small li:first a").attr("navUrl"); 
} 

For example: Clicking on element A triggers an event on element B. Logically speaking, the event source at this time is element B. It will be recognized as element A under IE8. It is no problem under other browsers. There is no good solution for the time being. I Here I just manually get the B element under IE8

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn