StefiIOE

lab 2.1

Feb 10th, 2020
216
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPEhtml>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5.   <meta charset="utf-8"/>
  6.   <title>About Me</title>
  7. </head>
  8. <body>
  9. <form>
  10.   <select id="colorSelect">
  11.     <option>Red</option>
  12.     <option>Green</option>
  13.     <option>White</option>
  14.     <option>Black</option>
  15.   </select>
  16.   <input type="button" onclick="removeColor()" value="Select and Remove"><br></form>
  17. </body>
  18. </html>
  19. <script>
  20. function removeColor()
  21. {
  22. var color=document.getElementById("colorSelect").value;
  23. console.log("color");
  24. var c= document.getElementById("colorSelect");
  25. c.remove(c.selectedIndex);
  26.  
  27. }
  28. </script>
RAW Paste Data