<select name='cmg_select' onChange="javascript:window.location.href='index.php?'+this.value">
<option value='pening'> pening </option>
<option value='complete'> complete </option>
<option value='pening'> pening </option>开发者_高级运维
</select>
The concatenation is not working.
- Remove the
javascript:
portion - Remove the
href
portion
The result :
< select name='cmg_select' onchange="window.location='index.php?'+this.value" >
Try this instead
<select name='cmg_select' onChange="window.location.href='index.php?'+this.options[this.selectedIndex].value">
<option value='pening' > pening </option>
<option value='complete' > complete </option>
<option value='pening' > pening </option>
</select>
Remove the javascript:
from the onchange
attribute.
精彩评论