在页面中打开页面.htm
来自「较为详细的介绍了asp自定义的各种函数,方便asp的各种开发.」· HTM 代码 · 共 45 行
HTM
45 行
脚本说明:
把如下代码加入<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 + =
减小字号Ctrl + -
显示快捷键?