mats47Medlem sedan mars 2009185 inlägg hur gör jag att den gömmer och visar text av en rulningslista?
<select name="ks" tabindex="10" >
<OPTION VALUE=""></OPTION>
<OPTION VALUE="Postforskott" >postförskott</OPTION>
<OPTION VALUE="Hämtas">Hämtas</OPTION>
<OPTION VALUE="samarbetspartner">samarbetspartner</OPTION>
<div style="display: none;" id="script">
BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH BLAH</div>
Tex när jag väljer Postforskott ska ett speciellt text komma fram, Hämtas har en annan osv medan "" har ingen.
Web-TorMedlem sedan nov. 200013 890 inlägg Här är ett sätt att lösa det på:
<script>
function f(elm){
var info = document.getElementById("info");
if(elm.selectedIndex == 0){
info. innerHTML = "";
}else if(elm.selectedIndex == 1){
info. innerHTML = "Information om postforskott.";
}else if(elm.selectedIndex == 2){
info. innerHTML = "Information om hur man hämtar.";
}else if(elm.selectedIndex == 3){
info. innerHTML = "Information om samarbetspartner.";
}
}
</script>
<select onchange="f(this);">
<option>[Välj leverans]</option>
<option>Postforskott</option>
<option>Hämtas</option>
<option>Samarbetspartner</option>
</select>
<div id="info"></div>