Go back
<html> <head> <title>Using jQuery Format Plugin for Entering Email with Warning</title> <script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript" src="/js/jquery.format.1.03.js"></script> </head> <body> This example is extracted from <a href="http://examplet.buss.hk/jquery/format.php" target="_blank"> http://examplet.buss.hk/jquery/format.php</a> <br/> Please input an Email Address (Prompt a warning if the format is incorrect!):<br/> <input type="text" class="warning-email" size="30"/> <script type="text/javascript"> $(".warning-email").format({type:"email"},function(){ if($(this).val()=="") alert("Please enter email!"); else alert("Wrong Email format!"); }); </script> </body> </html>
Your Result:
Edit the code above and click to see the result.