日期:2014-05-17 浏览次数:20423 次
<form action='a.php?act=XXX' method='post'>
<input type='text' name='action' value=''/>
<input type='submit' name='sub' value='提交'/>
</form>
<script type="text/javascript">
function fun_action_src(){
var vals = document.getElementById('aid').value;
document.getElementById('form1').action = "a.php?act="+vals;
document.getElementById('form1').submit();
//alert(vals);
}
</script>
<form id="form1" action='' method='post'>
<input id="aid" type='text' name='action' value=''/>
<input onclick="fun_action_src()" type='button' name='sub' value='提交'/>
</form>