百度首页 | 百度空间
 
查看文章
 
子父窗体间的值传递
2008-06-05 01:51

a.html

<script>
function fortable1()
{
/****弹出模式对话框*****/
path = "table.html";
var gysArr = window.showModalDialog(path,"new","dialogHeight:500px;dialogWidth:450px;edge:Raised;center:Yes;help:No;resizable:no;status:no;");
if (gysArr != null){
var ss;
ss=gysArr.split("*");
document.all.a.value= ss[0];
document.all.b.value= ss[1];
}
}
</script>
</head>

<body>
<input type=text name=a><input type=text name=b>
<input type="button" name="S" value="选择" onClick="fortable1();">
<body>
</body>
</html>

=======================================================================

table.html

/*************此段实现页面随着数据库变化而变化****************/
<head>
<META HTTP-EQUIV="Expires" CONTENT="0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
</head>
/*************************************************************/
<SCRIPT LANGUAGE=JavaScript>
function aaa()
{
window.returnValue = selrow.value+"*"+selcol.value;
window.close();
}
</SCRIPT>

</HEAD>

<BODY bgcolor=menu >
输入表格
<table border="0" cellspacing="10" cellpadding="0">

<tr><td><INPUT TYPE=TEXT SIZE=7 ID=selrow></td><td><input type=text id=selcol size=7></tr>
<tr><td><BUTTON ID=Ok TYPE=button ONCLICK="aaa();">确定</BUTTON></td></tr></table>
</BODY>  
</HTML>


类别:Javascript | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码:
 

     

©2008 Baidu