前言:
此时你们对“js关闭windowopen”大概比较关切,各位老铁们都需要了解一些“js关闭windowopen”的相关知识。那么小编在网上汇集了一些对于“js关闭windowopen””的相关内容,希望各位老铁们能喜欢,小伙伴们一起来了解一下吧!例 1.4.1(open&closeIEFF.html)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<SCRIPT LANGUAGE="JavaScript">
<!--
function choice()
{
/* -
- aNewWindow = open()
- aNewWindow = open(aURL)
- aNewWindow = open(aURL, aName)
- aNewWindow = open(aURL, aName, aFeatureList)
*/
window.open("cla.html");
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM METHOD=POST ACTION="" name="form1">
<INPUT TYPE="text" name="cla">
<INPUT TYPE="button" value="点我" onclick="choice()" >
</FORM>
</BODY>
</HTML>
cla.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<SCRIPT LANGUAGE="JavaScript">
<!--
function returnV(t)
{
/*
Window.opener (Property)
A reference to the window that contained the link that opened this one.
*/
window.opener.document.form1.cla.value=t.value;
/* Window.close() (Method)
This will close the window.
JavaScript syntax: - close()
- myWindow.close()
The method window.close() will attempt to close the window in which the script is executing.
*/
close();
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<select onchange="returnV(this)">
<option value="请选择班级">请选择班级</option>
<option value="0708">0708</option>
<option value="0709">0709</option>
<option value="0802">0802</option>
</select>
</BODY>
</HTML>
篇幅有限更多请见扩展链接:「链接」
标签: #js关闭windowopen #open在css #jsclose