我有这个按钮,它应该转到值中的页面,但是当我有 css 时它没有,没有它可以工作,但看起来很糟糕:
<form action="table.php" name="rows" method="POST">
<select class="styledselect_pages" onchange="window.location.href = this.options[this.selectedIndex].value;">
<option value="table.php?row=100">100</option>
</select>
</form>
这个CSS:
.styledselect_pages {
background :url(../images/table/select_number_rows.gif) left no-repeat;
border :none;
border-left :none;
color :#393939;
cursor :pointer;
display :block;
font-family :Arial;
font-size :12px;
height :20px;
line-height :16px;
margin :0px 0px 0px 0px;
padding :4px 0 0 6px;
text-align :left;
width :130px;
}
为什么“Onchange”不起作用?