daily pastebin goal
82%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.  
  3. <form>
  4.   First Name: <input id="firstname" type="text" name="firstname"><br><br>
  5.   Last Name: <input type="text" name="lastname"><br><br>
  6.   Nickname: <input id="nickname" type="text" name="lastname"><br><br>
  7.   Street Address: <input type="text" name="stradd"><br><br>
  8.   City: <input type="text" name="lastname"><br><br>
  9.   Birthday: <input type="date" name="bday"><br><br>
  10.   Sex:<select>
  11.   <option value="male">Male</option>
  12.   <option value="female">Female</option>
  13.   <option value="other">Other</option>
  14. </select>
  15.   <br><br>First time to attend this conference? <br>
  16. <input type="radio" name="gender" value="yes"> Yes<br>
  17. <input type="radio" name="gender" value="no"> No<br>
  18. <br>At which days will You paricipate in this conference?<br>
  19. <input id="day1" type="checkbox" name="day1" value="saturday"> Saturday<br>
  20.   <input id="day2" type="checkbox" name="day2" value="sunday"> Sunday<br>
  21. <br>Would You like to buy our conference's T-Shirt?
  22. <input id="tocheck" onclick="showPanel()" type="checkbox" name="pplace" value="yes"> Yes<br>
  23.  <p id="hiddenQuestion" style="display: none">Select T-Shirt text:</p>
  24. <select id="hiddenPanel" style="display: none">
  25. </select>
  26. </form>
  27. <script>
  28. function showPanel()
  29. {
  30.  
  31. if(document.getElementById("tocheck").checked)
  32. {
  33.     document.getElementById("hiddenQuestion").style.display = "inline";
  34.     var panel = document.getElementById("hiddenPanel");
  35.     panel.style.display = "inline";
  36.     var option = document.createElement("option");
  37.         option.text = document.getElementById("firstname").value;
  38.         panel.add(option);
  39.         option.text = document.getElementById("nickname").value;
  40.         panel.add(option);
  41.  
  42.    
  43. }
  44. else
  45. {
  46.     var panel = document.getElementById("hiddenPanel");
  47.         var option = document.createElement("option");
  48.         panel.remove(0);
  49.         panel.remove(0);
  50.         document.getElementById("hiddenQuestion").style.display = "none";
  51.         panel.style.display = "none";
  52.    
  53. }
  54. }
  55. </script>
  56. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top