Tuesday, 20 December 2016

HTML FORM ACCEPTING AND DISPLAYING USER DETAILS

<!DOCTYPE html>
<html>
    <head>
        <title>Web Form</title>
 <script type="text/javascript">

          function addtext()
          {
             var fname = document.myform.first_name.value;
             var lname = document.myform.last_name.value;
             var email = document.myform.email_ID.value;
             var msg=document.myform.msg_txt.value;
             var Sex=document.myform.Sex_sp.value;
           
             document.writeln("Thank you! You have just entered the following:");
             document.writeln("<pre>");
             document.writeln("First Name    : " + fname);
             document.writeln("Last Name     : " + lname);
             document.writeln("Email Address : " + email);
             document.writeln("Message       : " + msg);
             document.writeln("Sex           : " + Sex);
          }
       
         
        </script>
   
           </head>
    <body>
        <h1>CONTACT US!</h1>
               <form name="myform">
                    First name: <input type="text" name="first_name" value=""><br/>
                    Last name : <input type="text" name="last_name" value=""><br/>
                    E-mail    : <input type="email" name="email_ID" value=""><br/><br/>
                    Message   : <br/><textarea name="msg_txt" ></textarea><br/>
                    <p>Sex:</p>
                    <input type="radio" name="Sex_sp" value="male">Male
                    <input type="radio" name="Sex_sp" value="female">Female<br/><br/>
                    <input type="Submit" value="Submit" onClick="addtext()">
    <button type="button" class="cancelbtn">Cancel</button>
                   
                </form>
         
    </body>
</html>



No comments:

Post a Comment

Oracle Reserved Words

Oracle  Reserved Words The following words are reserved by Oracle. That is, they have a special meaning to Oracle and so cannot be redefi...