📄 在页面中打开页面.htm
字号:
脚本说明:
把如下代码加入<body>区域中:
<form name="jumpy">
<select name="example" size="1" onChange="gone()">
<option value="http://www.sina.com.cn" selected>新浪网</option>
<option value="http://www.163.com">网易</option>
<option value="http://www.google.com">Google搜索</option>
<option value="http://www.sohu.com">搜狐</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gone()">
</form>
<script language="javascript">
<!--
var displaymode=0
//if displaymode=0, configure inline frame attributes (ie: dimensions, intial document shown
var iframecode='<iframe id="external" style="width:85%;height:400px" src="http://www.cctv.com"></iframe>'
/////NO NEED TO EDIT BELOW HERE////////////
if (displaymode==0)
document.write(iframecode)
function gone(){
var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
if (document.getElementById&&displaymode==0)
document.getElementById("external").src=selectedurl
else if (document.all&&displaymode==0)
document.all.external.src=selectedurl
else{
if (!window.win2||win2.closed)
win2=window.open(selectedurl)
//else if win2 already exists
else{
win2.location=selectedurl
win2.focus()
}
}
}
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -