<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <script language="javascript"> function fncSubmit() { if(confirm('Confirm to submit')==true) { return true; } else { return false; } } </script> <form action="page.cgi" method="post" name="form1" onSubmit="JavaScript:return fncSubmit();"> <input name="txtName" type="text" id="txtName"> <input name="btnSubmit" type="submit" value="Button"> </form> </body> </html>
<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <script language="javascript"> function fncSubmit() { document.form1.submit(); } </script> <form action="page.cgi" method="post" name="form1"> <input name="txtName" type="text" id="txtName"> <input name="btnSubmit" type="button" value="Button" onClick="JavaScript:fncSubmit();"> </form> </body> </html>
<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <script language="javascript"> function fncSubmit() { if(confirm('Confirm to submit')==true) { document.form1.submit(); } } </script> <form action="page.cgi" method="post" name="form1"> <input name="txtName" type="text" id="txtName"> <input name="btnButton" type="button" value="Button" onClick="JavaScript:fncSubmit();"> </form> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท