IE10下js点击事件失效

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/zhousheng193/article/details/84793055

网站在ie10下有些界面不能显示,有些脚本不能执行,主要是因为iE10设置的原因

1. 安全性设置



2.启用脚本,把勾去掉即可执行脚本了




 
 
 
 

展开阅读全文

js点击事件失效

05-10

[code=javascript]/*rn * 1rn * 2rn * 3rn * 4rn */rnwindow.onload = function()rn var btn = document.getElementsByTagName("button");rn btn.onclick = loadXMLDoc("catlog.xml");rn //btn.addEventListener("click",loadXMLDoc("catlog.xml"));rn;rnrnfunction loadXMLDoc(url)rn var txt,x,xx,i;rn var xhr = new XMLHttpRequest();rn xhr.onreadystatechange = function()rn if(xhr.readyState == 4 && xhr.status == 200)rn txt = "";rn xx = x[i].getElementsByTagName("TITLE");rn rn tryrn txt = txt + " TITLE ARTIST COUNTRY COMPANY PRICE YEAR ";rn x = xhr.responseXML.documentElement.getElementsByTagName("CD");rn for(i=0;i " + xx[0].firstChild.nodeValue + "";rn catch(e)rn txt = txt + " ";rn rn rn xx = x[i].getElementsByTagName("ARTIST");rn rn tryrn txt = txt + " " + xx[0].firstChild.nodeValue + "";rn catch(e)rn txt = txt + " ";rn rn rn xx = x[i].getElementsByTagName("COUNTRY");rn rn tryrn txt = txt + " " + xx[0].firstChild.nodeValue + "";rn catch(e)rn txt = txt + " ";rn rn rn xx = x[i].getElementsByTagName("COMPANY");rn rn tryrn txt = txt + " " + xx[0].firstChild.nodeValue + "";rn catch(e)rn txt = txt + " ";rn rn rn xx = x[i].getElementsByTagName("PRICE");rn rn tryrn txt = txt + " " + xx[0].firstChild.nodeValue + "";rn catch(e)rn txt = txt + " ";rn rn rn xx = x[i].getElementsByTagName("YEAR");rn rn tryrn txt = txt + " " + xx[0].firstChild.nodeValue + "";rn catch(e)rn txt = txt + " ";rn rn rn rn txt = txt + "";rn document.getElementById("txtCDinfo").innerHTML = txt;rn rn ;rn xhr.open("GET", url, true);rn xhr.send();rnrnrnrnrnrnrn[/code] 论坛

没有更多推荐了,返回首页