<? include("../include/opendb.php");
$sql="select username from user group by username order by id DESC";
$rs=Execute($sql);$row=NumRows($rs);
?>
<script>
function selectsubmit(form){
var username="<?echo $username;?>";
window.location="a_controlmag.php?active=up&mselt="+mselt+"&username="+username;
}
</script>
<body><form name="form" method="post" action="">
<table width="100%" border="1" align="center">
<tr><td width="10%">username</td><td width="30%">modify</td></tr>
<?while($row = FetchArray($rs)){?>
<tr><td><?=$row[username]?></td>
<?$sql1="select username from user where username = '$row[username]' ";
$rs1=Execute($sql1);$row1=NumRows($rs1);
?>
<td>
<input type="hidden" name="username" value="<?echo $row[username] ;?>">
<select name="mselt" id="select" onChange="selectsubmit(this.form);">
<option value="0" <?if($row1=="0"){echo "selected";}?>>closed</option>
<option value="1" <?if($row1=="1"){echo "selected";}?>>opened</option>
</select></td>
</tr><?}?></table></form></body>
请问点击选择框后如何得到mselt和username的值
文章来源于领测软件测试网 https://www.ltesting.net/
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073