为什么我用js写的效果,只有在IE浏览器中才看的到,而在360和搜狗浏览器都出不来效果, 就大神帮忙改一下 5
<script>functioncx(){varvl=document.getElementById("cxh").value;varcontentXML=loadXML...
<script>
function cx(){
var vl=document.getElementById("cxh").value;
var contentXML = loadXMLDoc("xml/Users.xml");
var user = contentXML.getElementsByTagName("User");
for(var i = 0 ; i < user.length ; i++){
var wsh = user[i].getElementsByTagName("wsh")[0].firstChild.data;
var sfz = user[i].getElementsByTagName("IDcard")[0].firstChild.data;
var sqh = user[i].getElementsByTagName("sqh")[0].firstChild.data;
if(vl==wsh||vl==sfz||vl==sqh){
window.location.href=wsh+".html";
return;
}
}
alert("号码不存在");
}
</script> 展开
function cx(){
var vl=document.getElementById("cxh").value;
var contentXML = loadXMLDoc("xml/Users.xml");
var user = contentXML.getElementsByTagName("User");
for(var i = 0 ; i < user.length ; i++){
var wsh = user[i].getElementsByTagName("wsh")[0].firstChild.data;
var sfz = user[i].getElementsByTagName("IDcard")[0].firstChild.data;
var sqh = user[i].getElementsByTagName("sqh")[0].firstChild.data;
if(vl==wsh||vl==sfz||vl==sqh){
window.location.href=wsh+".html";
return;
}
}
alert("号码不存在");
}
</script> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询