JAVASCRIPT访问父窗口的变量或方法
AA.HTM
-------------------------------------
<!--
showModalDialog函数的使用 (转)
本范例可以实现弹出一个模态窗口,并演示了两种接收和传递参数的方法,同时可以接受模态窗口返回的多个变量
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>主界面</title>
</head>
<body>
<form id="getForm"> 回传值:
<input type="text" id="getData" readOnly>
<input type="text" id="getData1" readOnly>
<input type="text" id="getData2" readOnly>
</form>
<input type="button" value="打开新窗口1" onClick="openWin1()">
<input type="button" value="打开新窗口2" onClick="openWin2()">
<script language="JavaScript">
function openWin1()
{
var srcFile = "BB.htm"; //新窗口的文档名称
var winFeatures = "dia
相关文档:
① JavaScript添加位置,添加位置错误,会引起JavaScript代码无法执行的问题。
<head runat="server">
<script type='text/javascript' language="javascript">
<!—
//“添加内容”
//-->
</script>
</head>
② 引用他处的脚本 ......
<html>
<head>
<script language="JavaScript">
<!--页面载入时初始化所有未选择的数据-->
function loadAllUnselected()
{
var unassignedTable=doc ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>vForm表单验证程 ......
1. CSS
<style>
.dstyle1 {
font-size:13px;
font-weight: bold;
color: #ff6600;
}
.dstyle2 {
font-size:13px;
font-weight: bold;
color: #ffffff;
}
</style>
2. JavaScript
<script type="text/javascript">
m();
function m()
{
document.getElementById("span_new").classNa ......
<html>
<head>
<title>Javascript</title>
<script language="Javascript" type="text/javascript">
function callMethod()
{
/*http://localhost/waa/WebService.asmx为Servic ......