1 回答
TA贡献1872条经验 获得超3个赞
它很粗糙,但它会起作用:
<?php
$id=0;
if(isset($_GET['ID']){
$id = $_GET['ID'];
}
?>
<select id="jumpid" onchange="jump(this)" >
<option value="index.php?ID=1" <?php if($id==1){echo "selected";}?>>Val 1</option>
<option value="index.php?ID=2" <?php if($id==2){echo "selected";}?>>Val 2</option>
<option value="index.php?ID=3" <?php if($id==3){echo "selected";}?>>Val 3</option>
<option value="index.php?ID=4" <?php if($id==4){echo "selected";}?>>Val 4</option>
<option value="index.php?ID=5" <?php if($id==5){echo "selected";}?>>Val 5</option>
<option value="index.php?ID=6" <?php if($id==6){echo "selected";}?>>Val 6</option>
<option value="index.php?ID=7" <?php if($id==7){echo "selected";}?>>Val 7</option>
</select>
- 1 回答
- 0 关注
- 214 浏览
添加回答
举报