Probleme mit DropDown-Menü seit IE 9
2012-4-26 23:01:00来源:IE9\IE8
Hallo,
Ich habe auf einer Seite folgenden Quellcode:
function webClient() { var i; this.IE = false; this.NS = false; this.OP = false; this.release = null; if ((i = navigator.userAgent.indexOf("Opera")) >= 0) { this.OP = true; this.version = parseFloat(navigator.userAgent.substr(i + 5)); return; } if ((i = navigator.userAgent.indexOf("MSIE")) >= 0) { this.IE = true; this.release = parseFloat(navigator.userAgent.substr(i + 4)); return; } if ((i = navigator.userAgent.indexOf("Netscape6/")) >= 0) { this.NS = true; this.release = parseFloat(navigator.userAgent.substr(i + 10)); return; } if ((i = navigator.userAgent.indexOf("Netscape7/")) >= 0) { this.NS = true; this.release = parseFloat(navigator.userAgent.substr(i + 10)); return; } if ((i = navigator.userAgent.indexOf("Gecko")) >= 0) { this.NS = true; this.release = 6.1; return; } } var webClient = new webClient(); var activeButton = null; var activeSubButton = null; if (webClient.IE) document.onmousedown = pageMouseDown; else document.addEventListener("mousedown", pageMouseDown, true); function pageMouseDown(event) { var el; //if (activeButton == null) // return; if (webClient.IE) el = window.event.srcElement; else el = (event.target.tagName ? event.target : event.target.parentNode); if (el == activeButton || el == activeSubButton) return; if (el.className != "menuButton" && el.className != "menuItem" && el.className != "menuItemSep" && el.className != "menu") { if (activeButton) closeMenu(activeButton); if (activeSubButton) closeSubMenu(activeSubButton); } } function menuTouch(event, menuName) { var button; if (webClient.IE) button = window.event.srcElement; else button = (event.target.tagName ? event.target : event.target.parentNode); if (!button.menu && menuName) button.menu = document.getElementById(menuName); if (activeButton && activeButton != button) closeMenu(activeButton); if (activeSubButton && activeSubButton != button) closeSubMenu(activeSubButton); if (!button.isactive) if (menuName) { openMenu(button); //} else { // activeButton=button; // button.isactive=true; // button.className = "menuButtonActive"; } return false; } function subMenuTouch(event, menuName) { var button; if (webClient.IE) button = window.event.srcElement; else button = (event.target.tagName ? event.target : event.target.parentNode); if (!button.menu && menuName) button.menu = document.getElementById(menuName); if (activeSubButton && activeSubButton != button) closeSubMenu(activeSubButton); if (!button.isactive && menuName) openSubMenu(button); return false; } function openSubMenu(button) { var w, dw, x, y; button.className = "menuItemActive"; if (webClient.IE && !button.menu.firstChild.style.width) { w = button.menu.firstChild.offsetWidth; button.menu.firstChild.style.width = w + "px"; dw = button.menu.firstChild.offsetWidth - w; w -= dw; button.menu.firstChild.style.width = w + "px"; } x = getPageOffsetLeft(button)+ button.offsetWidth;; y = getPageOffsetTop(button); x++; y++; button.menu.style.left = x + "px"; button.menu.style.top = y + "px"; button.menu.style.visibility = "visible"; button.isactive = true; activeSubButton = button; } function openMenu(button) { var w, dw, x, y; button.className = "menuButtonActive"; if (webClient.IE && !button.menu.firstChild.style.width) { w = button.menu.firstChild.offsetWidth; button.menu.firstChild.style.width = w + "px"; dw = button.menu.firstChild.offsetWidth - w; w -= dw; button.menu.firstChild.style.width = w + "px"; } x = getPageOffsetLeft(button)-1; y = getPageOffsetTop(button) + button.offsetHeight; button.menu.style.left = x + "px"; button.menu.style.top = y + "px"; button.menu.style.visibility = "visible"; button.isactive = true; activeButton = button; } function closeMenu(button) { button.className = "menuButton"; if (button.menu) button.menu.style.visibility = "hidden"; button.isactive = false; activeButton = null; } function closeSubMenu(button) { button.className = "menuItem"; if (button.menu) button.menu.style.visibility = "hidden"; button.isactive = false; activeSubButton = null; } function getPageOffsetLeft(el) { return el.offsetLeft + (el.offsetParent ? getPageOffsetLeft(el.offsetParent) : 0); } function getPageOffsetTop(el) { return el.offsetTop + (el.offsetParent ? getPageOffsetTop(el.offsetParent) : 0); }
Leider funktioniert jetzt seit Internet Explorer 9 das DropDown-Menü nicht mehr.
Hat jemand eine Idee an was das liegen k?nnte und was ich ?ndern muss?
VIELEN DANK schon mal!!
Gru?
Matthias
-
ie10下 怎么安装flash调试版本 我把flex卸了 但现在什
2012-10-18 13:47:00我把flex卸了 但现在什版本都装不了了 一装就提示已有最新版本,现在百度文档都看不了了。
win7 x86 旗舰版装了IE9但是太卡了...怎么换回IE8?
2011-3-24 19:20:00win7 x86 装了IE9但是太卡了...怎么换回IE8?打开两三个网页都能占500-600M内存.... 下载的IE8无法安装,提示 :此操作系统不支持IE8.... 求指教~谢谢~~
IE8无法使用“开发人员工具”查看Cookie?
2012-1-30 10:57:00Windows 7 默认的浏览器为IE 8,今天用其调试网页时,想要查看生成的Cookie。打开“开发人员工具”→缓存→查看Cookie信息时,总是弹出&
IE 9 zeigt zeitweise keine grafischen Elemente an
2011-3-19 17:58:00Hallo, folgendes Problem: Seit dem Update von IE 8 auf 9 zeigt der IE nach einiger Zeit der Benutzu
IE9 无法打开魔兽英雄榜,怎么解决???
2011-3-24 12:11:00http://cn.wowarmory.com/ 无法显示 XML 页。 无法查看使用 XSL 样式表的 XML 输入。请更正错误然后单击 刷新 按钮,或稍后重试。 [hr]DTD 中不支持使
IE8登陆广发银行内存出错不能为“written”
2011-3-27 21:01:00上百度听歌也是同样的问题!
IE9的onpropertychange问题
2011-4-11 17:51:00<! DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xh
IE9速度快很多,可就是登录和回帖的时候没跳转,请问怎么设置?
2011-3-23 11:53:00登录论坛,出现红叉叉,文字信息看不到,其实已经登录,要刷新一次网页 同样,回帖也会和登录一样,也要刷新一次网页 太麻烦了,而且给人感觉想出错了一样,请问要怎么设置才能解决这个问题?
IE9 CSS样式加载不进来
2011-6-8 16:40:00我的网站用IE9打开,发现CSS样式文件丢失没有加载进来,但是点击右上角那个“兼容性视图”又可以。 我按F12开发人员工具查看:发现CSS样式文件状态始终在“加
不同OS中向IE拖放文件
2011-3-19 17:58:00如题。测试了IE6,7,8,结果相同。 XP: 可 2003: 不可 Vista,7: 普通启动可,以管理员启动IE不可 2008: 普通启动和以管理员启动均可 请问能否做到在所有OS