Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <title>Project</title>
  4. <script language = "JavaScript">
  5. function button1click(){
  6. var Name = " ";
  7. Name = document.Form1.TextBox1.value;
  8.  
  9. var Contact = " ";
  10. Contact = document.Form1.TextBox2.value;
  11. var Email1 = " ";
  12. var Email2 = " ";
  13.  
  14.  
  15. if (Form1.ListBox1.selectedIndex == 0){
  16. document.Form1.ListBox1.selectedIndex
  17. Email1 = "@yahoo.com";
  18. }
  19. if(Form1.ListBox1.selectedIndex == 1){
  20. document.Form1.ListBox1.selectedIndex
  21. Email1 = "@gmail.com";
  22.  
  23. }
  24.  
  25. Email2 = document.Form1.TextBox3.value;
  26. var Gender = " ";
  27.  
  28. for(var i = 0; i < Form1.Option1.length; i++)
  29. {
  30. if(Form1.Option1[i].checked)
  31. {
  32. Gender = Form1.Option1[i].value;
  33. }
  34. }
  35. var Education = " ";
  36.  
  37. for(var i = 0; i < Form1.CheckBox1.length; i++)
  38. {
  39. if(Form1.CheckBox1[i].checked)
  40. {
  41. Education = Form1.CheckBox1[i].value;
  42. }
  43. }
  44. document.Form1.TextArea1.value = "Name:" + Name + "\n" + "Contact:" + Contact + "\n" + "Email:" + Email2 + Email1 + "\n" + "Gender:" + Gender + "\n" + "Education:" + Education;
  45. }
  46.  
  47.  
  48.  
  49. </script>
  50. <font face="Courier New" color="#D27300" size="2">
  51. <Form name="Form1">
  52. <body BGcolor="#353535">
  53. <body style="font-family:Courier New Bold;" >
  54. <br>Name:<br><input type="TextBox" name="TextBox1"><br>
  55. <br>Contact No:<br><input type="TextBox" name="TextBox2"><br>
  56. <br>Email:<br><input type = "TextBox" name = "TextBox3">
  57. <select type="ListBox" name="ListBox1" size="1">
  58. <option value="@yahoo">@yahoo</option>
  59. <option value="@gmail">@gmail</option>
  60. </select></br>
  61. Gender:</br>
  62. <input type="Radio" name="Option1" value = "Male">Male</br>
  63. <input type="Radio" name="Option1" value = "Female">Female</br>
  64. Select 1:</br>
  65. <input type="CheckBox" name="CheckBox1" value="Highschool">Highschool</Br>
  66. <input type="CheckBox" name="CheckBox1" value="College">College</br>
  67. <input type="CheckBox" name="CheckBox1" value="SeniorHigh">Senior High</br>
  68. <input type="button" name="button1" onClick="JavaScript:button1click(this.form);" value="Show"></br>
  69. <TextArea name="TextArea1" rows="5" cols="30">
  70. </TextArea>
  71.  
  72. <option>
  73. </font>
  74. </body>
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement