一般比较简单的就是
document.formName.action="/dddd.do?ddd="+str
document.formName.submit();
写成函数式的调用就是
复制代码 代码如下:
<script language="JavaScript" >
function checkaction(v){
if(v==0){
document.dbform.action="index.php?admin_db-repair";
}else{
document.dbform.action="index.php?admin_db-optimize";
}
dbform.submit();
}
</script>
<form action="" method="post" name="dbform">
<input type="submit" class="btn" value="{lang dbStartOptimize}" name="opsubmit" onclick="checkaction(1);" />
<input type="submit" class="btn" value="{lang dbStartFix}" name="resubmit" onclick="checkaction(0);" />
</form>
时间: 2024-10-27 05:02:50