首页 > Web开发 > 详细

html(jsp)如何实现对form提交前进行确认

时间:2014-12-09 19:49:55      阅读:337      评论:0      收藏:0      [点我收藏+]

<html>
 <head>
  <title>Validator</title>
  <script type="text/javascript">
   function checkForm() {
    if (window.confirm("Are you sure you want to sumbit this form?")) {
     return true;
    }
    return false;
   }
  </script>
 </head>
 <body>
  <form action="2.html" onsubmit="return checkForm()">
   Please click the submit button:<br>
   <input type="text" name="text" value="text"><br>
   <input type="submit">
  </form>
 </body>
</html>

bubuko.com,布布扣

html(jsp)如何实现对form提交前进行确认

原文:http://jlins.blog.51cto.com/4487484/1588026

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!