日期:2014-05-17  浏览次数:20765 次

onclick在firefox下可用在IE下不可用是怎么回事啊
<select id="select_order" name='select_order'>
<option value="0">
-----请选择排序方式-----
</option>
<s:if test="sortId==1">
<option value="1" onclick="javascript: location = 'themelist.action?sortId=1';" selected="selected">
按投票总数排序
</option>
<option value="2" onclick="javascript: location = 'themelist.action?sortId=2';">
按结束时间排序
</option>
<option value="3" onclick="javascript: location = 'themelist.action?sortId=3';">
按选择模式排序
</option>
</s:if>
<s:if test="sortId==2">
<option value="1" onclick="javascript: location = 'themelist.action?sortId=1';">
按投票总数排序
</option>
<option value="2" onclick="javascript: location = 'themelist.action?sortId=2';" selected="selected">
按结束时间排序
</option>
<option value="3" onclick="javascript: location = 'themelist.action?sortId=3';">
按选择模式排序
</option>
</s:if>
<s:if test="sortId==3">
<option value="1" onclick="javascript: location = 'themelist.action?sortId=1';">
按投票总数排序
</option>
<option value="2" onclick="javascript: location = 'themelist.action?sortId=2';">
按结束时间排序
</option>
<option value="3" onclick="javascript: location = 'themelist.action?sortId=3';" selected="selected">
按选择模式排序
</option>
</s:if>
</select>

------解决方案--------------------
这是不可能的,你把写法改下看看
window.location.href这样肯定可以
------解决方案--------------------
<select id="select_order" name='select_order' onchange="javascript: location = 'themelist.action?sortId='+this.value">
改为这样吧。通用。而且只要这option中设置就行了。