CSDN博客

img huoyin

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

发表于2008/10/1 7:44:00  3365人阅读

<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>
阅读全文
0 0

相关文章推荐

img
取 消
img