Important: The GCConnex decommission will not affect GCCollab or GCWiki. Thank you and happy collaborating!

Difference between revisions of "Test verca 5"

From wiki
Jump to navigation Jump to search
(Replaced content with "<html> <head> <title>dropdown menu using select tab</title> </head> <script> function favTutorial() { var mylist = document.getElementById("myList"); document.getElementBy...")
Tag: Replaced
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>
+
<form action="/action_page.php">
<head>
+
  <label for="cars">Choose a car:</label>
<title>dropdown menu using select tab</title>
+
  <select name="cars" id="cars">
</head>
+
    <option value="volvo">Volvo</option>
<script>
+
    <option value="saab">Saab</option>
function favTutorial() {
+
    <option value="opel">Opel</option>
var mylist = document.getElementById("myList");
+
    <option value="audi">Audi</option>
document.getElementById("favourite").value = mylist.options[mylist.selectedIndex].text;
+
  </select>
}
+
  <br><br>
</script>
+
  <input type="submit" value="Submit">
 
 
<body>
 
<form>
 
<b> Select you favourite tutorial site using dropdown list </b>
 
<select id = "myList" onchange = "favTutorial()" >
 
<option> ---Choose tutorial--- </option>
 
<option> w3schools </option>
 
<option> Javatpoint </option>
 
<option> tutorialspoint </option>
 
<option> geeksforgeeks </option>
 
</select>
 
<p> Your selected tutorial site is:
 
<input type = "text" id = "favourite" size = "20" </p>
 
 
</form>
 
</form>
</body>
 
</html>
 

Latest revision as of 11:59, 10 June 2022

<form action="/action_page.php">

 <label for="cars">Choose a car:</label>
 <select name="cars" id="cars">
   <option value="volvo">Volvo</option>
   <option value="saab">Saab</option>
   <option value="opel">Opel</option>
   <option value="audi">Audi</option>
 </select>
 

<input type="submit" value="Submit">

</form>