<script language=”JavaScript”>window.status = “A new status message”;</script>
<script language=”JavaScript”>var userChoice = window.confirm(“Click OK or Cancel”);if (userChoice) { document.write(“You chose OK”); } else { document.write(“You chose Cancel”); }</script>
<script language=”JavaScript”>var userName = window.prompt(“Please Enter Your Name”,”Enter Your Name Here”);document.write(“Your Name is “ + userName);</script>
//打开一个名称为myNewWindow的浏览器新窗口<script language=”JavaScript”>window.open(“http://www.liu21st.com/”,”myNewWindow”);</script>
<script language=”JavaScript”>window.open(“http://www.liu21st.com/”,”myNewWindow”,'height=300,width=300');</script>
<script language=”JavaScript”>window.open(“http://www.liu21st.com/”,”myNewWindow”,'height=300,width=300,left=200,screenX=200,top=100,screenY=100');</script>
<script language=”JavaScript”>window.open(“http:
<script language=”JavaScript”>window.open('http://www.liu21st.com/' , 'myNewWindow', 'resizable=yes' );</script>
<a href='#' onClick='document.location = '125a.html';' >Open New Document</a>
<script language=”JavaScript”>if (document.all) { //如果是IE浏览器则使用scrollTop属性document.body.scrollTop = 200; } else { //如果是NetScape浏览器则使用pageYOffset属性window.pageYOffset = 200; }</script>
<a href='#' onClick=”window.open('http://www.juxta.com/','newWindow','fullScreen=yes');”>Open a full-screen window</a>
<script language=”JavaScript”>//定义新窗口var newWindow = window.open(“128a.html”,”newWindow”);newWindow.close(); //在父窗口中关闭打开的新窗口</script>在新窗口中关闭父窗口window.opener.close()
<script language=”JavaScript”>var newWindow = window.open(“”,”newWindow”);newWindow.document.open();newWindow.document.write(“This is a new window”);newWIndow.document.close();</script>
<frameset cols=”50%,*”><frame name=”frame1” src=”135a.html”><frame name=”frame2” src=”about:blank”></frameset>在frame1中加载frame2中的页面parent.frame2.document.location = “135b.html”;
function doAlert() { window.alert(“Frame 1 is loaded”); }
<body onLoad=”parent.frame1.doAlert();”>This is frame 2.</body>
<script language=”JavaScript”>var persistentVariable = “This is a persistent value”;</script><frameset cols=”50%,*”><frame name=”frame1” src=”138a.html”><frame name=”frame2” src=”138b.html”></frameset>
<frameset cols=”0,50%,*”><frame name=”codeFrame” src=”140code.html”><frame name=”frame1” src=”140a.html”><frame name=”frame2” src=”140b.html”></frameset>
posted on 2006-07-18 09:54 国强 阅读(214) 评论(0) 编辑 收藏 所属分类: js
Powered by: BlogJava Copyright © 国强