4.open&close
例 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="点我" οnclick="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>
更多内容请见原文,文章转载自:https://blog.csdn.net/qq_43650923/article/details/103044435
相关文章
- 10-07MapReduce当中Partitioner的用法
- 10-07Scala当中parallelize并行化的用法
- 10-07MapReduce当中Combiner的用法
- 10-07MapReduce当中的reduce当中的cleanup的用法
- 10-07jquery当中toggleClass的用法
- 10-07Spark Scala当中reduceByKey的用法
- 10-07jquery当中append的用法
- 10-07【JavaScript流程控制语句的用法及练习】
- 10-07Javascript的console.log()用法
- 10-07javascript中的innerHTML是什么意思,怎么个用法?