在javascript中控制提交表单

浏览:699 发布日期:2016/09/27 分类:技术分享
<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <title>Document</title>
 </head>
 <body>
  <form name="form" method="post" action="">
<input type="button" value="删除" onClick="delall();" class="button">
</form>
<script language="javascript">
    function delall(){
        if(confirm('确定删除选中的咨询吗?\n注意,删除后无法恢复!')){
            this.form.action="UserReview.asp?action=delall" //设置处理程序
            this.form.submit(); //提交表单
        }
    }
</script> 
 </body>
</html>
最佳答案
评论() 相关
后面还有条评论,点击查看>>