87,904
社区成员
发帖
与我相关
我的任务
分享
<script>
function changeURI(val){
var frame=document.getElementById("frame");
if(val=="1"){
frame.src="http://www.baidu.com"
}else if(val=="2"){
frame.src="http://www.sina.com"
}else{
frame.src="http://www.google.com"
}
}
</script>
<body>
<select id="sel" onchange="changeURI(this.value)">
<option value="1">baidu</option>
<option value="2">sina</option>
<option value="3">google</option>
</select>
<iframe src="http://www.baidu.com" id="frame"></iframe>
</body>