Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <title>Project</title>
- <script language = "JavaScript">
- function button1click(){
- var Name = " ";
- Name = document.Form1.TextBox1.value;
- var Contact = " ";
- Contact = document.Form1.TextBox2.value;
- var Email1 = " ";
- var Email2 = " ";
- if (Form1.ListBox1.selectedIndex == 0){
- document.Form1.ListBox1.selectedIndex
- Email1 = "@yahoo.com";
- }
- if(Form1.ListBox1.selectedIndex == 1){
- document.Form1.ListBox1.selectedIndex
- Email1 = "@gmail.com";
- }
- Email2 = document.Form1.TextBox3.value;
- var Gender = " ";
- for(var i = 0; i < Form1.Option1.length; i++)
- {
- if(Form1.Option1[i].checked)
- {
- Gender = Form1.Option1[i].value;
- }
- }
- var Education = " ";
- for(var i = 0; i < Form1.CheckBox1.length; i++)
- {
- if(Form1.CheckBox1[i].checked)
- {
- Education = Form1.CheckBox1[i].value;
- }
- }
- document.Form1.TextArea1.value = "Name:" + Name + "\n" + "Contact:" + Contact + "\n" + "Email:" + Email2 + Email1 + "\n" + "Gender:" + Gender + "\n" + "Education:" + Education;
- }
- </script>
- <font face="Courier New" color="#D27300" size="2">
- <Form name="Form1">
- <body BGcolor="#353535">
- <body style="font-family:Courier New Bold;" >
- <br>Name:<br><input type="TextBox" name="TextBox1"><br>
- <br>Contact No:<br><input type="TextBox" name="TextBox2"><br>
- <br>Email:<br><input type = "TextBox" name = "TextBox3">
- <select type="ListBox" name="ListBox1" size="1">
- <option value="@yahoo">@yahoo</option>
- <option value="@gmail">@gmail</option>
- </select></br>
- Gender:</br>
- <input type="Radio" name="Option1" value = "Male">Male</br>
- <input type="Radio" name="Option1" value = "Female">Female</br>
- Select 1:</br>
- <input type="CheckBox" name="CheckBox1" value="Highschool">Highschool</Br>
- <input type="CheckBox" name="CheckBox1" value="College">College</br>
- <input type="CheckBox" name="CheckBox1" value="SeniorHigh">Senior High</br>
- <input type="button" name="button1" onClick="JavaScript:button1click(this.form);" value="Show"></br>
- <TextArea name="TextArea1" rows="5" cols="30">
- </TextArea>
- <option>
- </font>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement