Test verca 5

From wiki
Revision as of 10:36, 10 June 2022 by Joaoluiz.defranco (talk | contribs) (Replaced content with "<html> <head> <title>dropdown menu using select tab</title> </head> <script> function favTutorial() { var mylist = document.getElementById("myList"); document.getElementBy...")
Jump to navigation Jump to search

<html> <head> <title>dropdown menu using select tab</title> </head> <script> function favTutorial() { var mylist = document.getElementById("myList"); document.getElementById("favourite").value = mylist.options[mylist.selectedIndex].text; } </script>

<body> <form> Select you favourite tutorial site using dropdown list <select id = "myList" onchange = "favTutorial()" > <option> ---Choose tutorial--- </option> <option> w3schools </option> <option> Javatpoint </option> <option> tutorialspoint </option> <option> geeksforgeeks </option> </select>

Your selected tutorial site is: <input type = "text" id = "favourite" size = "20"

</form> </body> </html>