Advertisement
viditkothari

Assignment10

Sep 15th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.07 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <body onload="noteTime()">
  4.         <script type="text/javascript">
  5.             var d1,d2;
  6.             function noteTime()
  7.                 {
  8.                     d1=new Date();
  9.                 }
  10.             function displayTime()
  11.                 {
  12.                     d2=new Date();
  13.                     alert("You spent " + (d2-d1) + " milliseconds with us.");
  14.                 }
  15.         </script>
  16.         <!-- The <style> section below is optional -->
  17.         <style type="text/css">
  18.             body{
  19.                 font-size:0.90em;
  20.                 font-family:sans-serif;
  21.             }
  22.         </style>
  23.         <form name="frm1" action="javascript:displayTime()">
  24.             <label for="name_txt">Full Name</label> : <input type="text" name="name_txt"><br/>
  25.             <label for="age_txt">Age</label> : <input type="text" name="age_txt"><br/>
  26.             <label for="sex_txt">Gender</label> : <input type="text" name="sex_txt"><br/>
  27.             <input type="submit" name="Submit_btn" value="Submit">
  28.         </form>
  29.     </body>
  30. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement