【发布时间】:2013-08-01 13:19:23
【问题描述】:
我的代码有问题,它在 Firefox 和 Internet Explorer 中运行良好,但不适用于 Opera 和 Chrome 浏览器...
<script>
function planetselect()
{
optionen=document.getElementById('pstart').options;
for(i=0;i<optionen.length;i++)
{
if(optionen[i].value==67080)
{
optionen[i].setAttribute('selected','selected');
}
}
optionen=document.getElementById('pdest').options;
for(i=0;i<optionen.length;i++)
{
if(optionen[i].value==67080)
{
optionen[i].setAttribute('selected','selected');
}
}
}</script>
【问题讨论】:
标签: javascript html google-chrome firefox dom