所以我使用了一个带有国家列表的HTML选择框和一个按钮来打开一个小窗口,其中包含HTML选择框中所选项目的更多详细信息。我的HTML下拉菜单在IE6中不起作用
以下是我正在做这个(我提前道歉这里任何noobishness,我还是很新的JavaScript):
//in header
<script type="text/javascript">
function popUp()
{
countryName = document.getElementById("countrylist").value;
document.write(countryName);
dest = "countries/" + countryName + ".html";
window.open(dest, 0, "toolbar=0, scrollbars=0, statusbar=0, menubar=0,resizable=0,width=400,height=400,left=440,top=312");
}
</script>
<form id="countryform">
<select id="countrylist">
<!--List of countries removed for brevity-->
</select>
<input type="button" name="countryBtn" value="Submit Query" onClick="popUp();">
</form>
能正常工作在Firefox,但不是在IE6。任何帮助,将不胜感激!
UPDATE:所以,我想下面的前两种方法,替代弹出功能并没有在任何浏览器中运行,并更换的document.getElementById线没有任何改变,仍然在Firefox正常工作,不在IE中。
良好的通话! 。 – 2009-06-11 18:19:19