dongzhuoxie1244 2012-06-16 09:26
浏览 40
已采纳

Internet Explorer在链选择中未显示<option>值

I've gone through and seen all the answers on IE and issues, but I believe mine is unique. If not, Sorry.

Im busy building a Vehicle listing website for a friend, and I've had some help from a freelancer who is nowhere to be found now.

IE is not showing my model range when I select a vehicle make on my site.

This is the website View it here!

FF and all other browsers work prefectly. I'll also share some code if needed. Thanks. But Im sure you can see the issue through source code viewer.

Thanks

  • 写回答

2条回答 默认 最新

  • douliao8402 2012-06-16 09:49
    关注

    It is a known bug for ie as IE don't support innerHTML property in case of select menus.

    So,follow this link http://support.microsoft.com/kb/276228

    Try this way instead of innerHTML use outerHTML only you have to also echo <select> tag in getodels.php and also this code is smarter and shorter than yours

    function makeModel(str, change)
    {var xmlhttp;
        if (str!="")
        {
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
            xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                var model = document.getElementById("model");
                model.outerHTML=xmlhttp.responseText;
                if(change) {
                }
            }
        }
        xmlhttp.open("GET","getmodels.php?make="+str,true);
        xmlhttp.send();
        }
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥20 java在应用程序里获取不到扬声器设备