運行我明白了運行良好的Firefox和Safari瀏覽器的JavaScript,但拒絕在IE的Javascript不是IE
運行它的下面:
var drop= function(id)
{
if(document.getElementById("select1").value == "Ficha de pediatria"){
top.location.href = "print.jsp?id="+id+"&type=2";
}
else if(document.getElementById("select1").value == "Ficha normal"){
top.location.href = "print.jsp?id="+id+"&type=1";
}
}
<select id="select1" name="select1" onChange="drop(id);return false;">
<option>Imprimir:</option>
<option>Ficha de pediatria</option>
<option>Ficha normal</option>
</select>
我trimed這個,因爲它有更多的JSP代碼,但它仍然是一樣的。任何人都知道爲什麼它不在IE上運行?
仍然不起作用:( – fmsf 2008-11-02 19:36:28