Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Да се направи се напише функцијата removeColor() која во конзола ќе ја испечати тековно селектираната од листата и ќе се избрише од истата.
- <!DOCTYPE html>
- <html><head>
- <meta charset=utf-8 />
- <title>Title</title>
- </head>
- <body>
- <script>
- function removecolor() {
- var x = document.getElementById("colorSelect");
- x.remove(x.selectedIndex);
- x.console.log(x.selectedIndex);
- }
- </script>
- <form>
- <select id="colorSelect">
- <option>Red</option>
- <option>Green</option>
- <option>White</option>
- <option>Black</option>
- </select>
- <input type="button" onclick="removecolor()" value="Select and Remove"><br></form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement