<body>
<select onchange="jumpto(this.value)">
<option value="http://sina.com.cn">新浪</option>
<option value="http://sohu.com">搜狐</option>
<option value="http://163.com">163</option>
</select>
<iframe id="iframe1"src="http://www.sina.com.cn" name="iframe1" width="200" marginwidth="0" height="160" marginheight="0" scrolling="no" frameborder="0"> </iframe>
<script type="text/javascript">
function jumpto(url)
{
var obj=document.getElementById("iframe1");
obj.src=url;
}
</script>
</body>
<select onchange="jumpto(this.value)">
<option value="http://sina.com.cn">新浪</option>
<option value="http://sohu.com">搜狐</option>
<option value="http://163.com">163</option>
</select>
<iframe id="iframe1"src="http://www.sina.com.cn" name="iframe1" width="200" marginwidth="0" height="160" marginheight="0" scrolling="no" frameborder="0"> </iframe>
<script type="text/javascript">
function jumpto(url)
{
var obj=document.getElementById("iframe1");
obj.src=url;
}
</script>
</body>
解决方案 »
- 怎么实现js在ie和火狐下运行
- 求下面这段JS兼容FF之后的代码
- 求大牛们指教,jsp 根据当前登陆的用户来显示不同的主页面
- 请问 :插入一个Base64编码的图片,如何打印这幅图片,打印总是黑块
- 一个简单的问题,可是我却不会
- 为什么我的这个JavaScript对象不能执行? 帮我看下,顺便评论下我的代码是不是规范的
- 如何调用windows自带的文件夹浏览功能!急!!在线等!
- 建立对象问题?
- 如何控制prompt的初始位置以及宽度!!!急!急!在线等待
- 怎样才能使一段含有字符,汉字,标点的文字在网页显示时能够撑满一行,行行对齐呢?
- ◆◆◆ DHTML:javascript操作表格问题,急!
- 如何用JS保存XML??
<select onchange="jumpto(this.value)">
<option value="http://sina.com.cn">新浪</option>
<option value="http://sohu.com">搜狐</option>
<option value="http://163.com">163</option>
</select>
<iframe id="iframe1"src="http://www.sina.com.cn" name="iframe1" width="200" marginwidth="0" height="160" marginheight="0" scrolling="no" frameborder="0"> </iframe>
<script type="text/javascript">
function jumpto(url)
{
var obj=document.getElementById("iframe1");
obj.src=url;
}
</script>
</body>