Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
<html>
<head>
<script type="Text/JavaScript">
function switcher(x)
{
if(x==1)
{
document.form_1.select_2.selectedIndex = document.form_1.select_1.selectedIndex;
}
else
{
document.form_1.select_1.selectedIndex = document.form_1.select_2.selectedIndex;
}
}
</script>
<form name="form_1">
<select name="select_1" onChange="switcher(1);">
<option>Auto wählen</option>
<option value="Audi">Audi</option>
<option value="Golf">Golf</option>
<option value="BMW">BMW</option>
</select>
<select name="select_2" onChange="switcher(2);">
<option>###</option>
<option value="#1">Audi #1</option>
<option value="#2">Golf #2</option>
<option value="#3">BMW #3</option>
</select>
</form>
</body>
</html>
Also, nach über 8 Jahren kann man schon einen neuen aufmachen,ich nutze den Thread einfach mal obwohl er schon ein bisschen älter !
Hat bis auf den Namen nichts miteinander zu tun.Ich kann kein JavaScript, nur ein wenig Java !
Genau.Müsste ich nicht im JavaScript irgendwie erstmal eine Funktion erstellen, die bei onClick den display Wert der zweiten Selectbox von none auf block oder so ändert ?
<html>
<head>
</head>
<body>
<form name="downloader">
<select name="car_select" onchange="if(this.selectedIndex != 0) document.downloader.site_select.disabled = false;">
<option>Auto wählen</option>
<option value="Audi">Audi</option>
<option value="Golf">Golf</option>
<option value="BMW">BMW</option>
</select>
<select name="site_select" onchange="if(this.selectedIndex != 0) document.downloader.button.disabled = false;" disabled="true">
<option>Site wählen</option>
<option value="http://www.google.de/search?q=">google</option>
<option value="http://www.test.net">test</option>
<option value="http://www.blub.de">blub</option>
</select>
<input id="button" type="button" value="Download"
onClick="location = document.downloader.site_select.options[document.downloader.site_select.selectedIndex].value + document.downloader.car_select.options
[document.downloader.car_select.selectedIndex].value" disabled="true" />
</form>
</body>
</html>
<form name="downloader">
<select name="car_select" onchange="if(this.selectedIndex != 0){ document.downloader.site_select.style.display = ''; this.style.display = 'none'; }">
<option>Auto wählen</option>
<option value="Audi">Audi</option>
<option value="Golf">Golf</option>
<option value="BMW">BMW</option>
</select>
<select name="site_select" onchange="if(this.selectedIndex != 0){ document.downloader.button.style.display = ''; this.style.display = 'none'; }" style="display: none;">
<option>Site wählen</option>
<option value="http://www.google.de/search?q=">google</option>
<option value="http://www.test.net">test</option>
<option value="http://www.blub.de">blub</option>
</select>
<input id="button" type="button" value="Download"
onClick="location = document.downloader.site_select.options[document.downloader.site_select.selectedIndex].value + document.downloader.car_select.options
[document.downloader.car_select.selectedIndex].value" style="display: none;" />
</form>
Hi, soll die 2. select also für jeden Wert der 1. andere options haben?