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
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