<form name="cr1">
<select name="cr2" size=1>
<option value=ww2> 6元区</option>
<option value=ww3> 8元区</option>
<option value=ww4> 10元区</option>
</select>
<input type="button" value="Go!" onClick="location=document.cr1.cr2.options[document.cr1.cr2.selectedIndex].value">
</form><iframe src="url" height="100%" width="100%" ></iframe>
从下拉菜单中选取一个,然后点go,在下面点的iframe中打开对应的网站,代码要怎么修改?谢谢
<select name="cr2" size=1>
<option value=ww2> 6元区</option>
<option value=ww3> 8元区</option>
<option value=ww4> 10元区</option>
</select>
<input type="button" value="Go!" onClick="location=document.cr1.cr2.options[document.cr1.cr2.selectedIndex].value">
</form><iframe src="url" height="100%" width="100%" ></iframe>
从下拉菜单中选取一个,然后点go,在下面点的iframe中打开对应的网站,代码要怎么修改?谢谢
var select=document.getElementById("cr2");
document.getElementById(iframeId).src="link?select="+select.options[select.selectedIndex].text
<form name="cr1">
<select id="cr2" name="cr2" size=1>
<option value="ww2"> 6元区 </option>
<option value="ww3"> 8元区 </option>
<option value="ww4"> 10元区 </option>
</select>
<input type="button" value="Go!" onClick="document.getElementById('f1').src = document.getElementById('cr2').value;">
</form> <iframe id="f1" height="100%" width="100%" > </iframe>
<select id="cr2" name="cr2" size=1>
<option value="www.yahoo.cn"> 6元区 </option>
<option value="www.sina.cn"> 8元区 </option>
<option value="www.g.cn"> 10元区 </option>
</select>
<input type="button" value="Go!" onClick="document.getElementById('f1').src = document.getElementById('cr2').value;">
</form> <iframe id="f1" height="100%" width="100%" > </iframe>
实际上打不开啊