zc136
新新人类
帖子
2
精华
0
无忧币 25
积分 7
阅读权限 20
|
发表于:2008-7-15 15:42
标题:javascript-弹出窗口选择其内容并返回的例子
<上一帖 |
下一帖>
主页面代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页技术 http://www.zc36.net</title>
</head>
<body>
<table>
<tbody>
<tr>
<td> </td>
</tr></tbody>
</table>
<script language="JavaScript">
var arr = showModalDialog("zc36.htm", "", "dialogWidth:40.08em; dialogHeight:15.83em; status:0");
if (arr != null){
alert(arr);
}
</script>
</body>
</html>
弹出窗口页面的代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>网页技术 http://zc36.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="center">
<td><a href="#" >网页技术</a></td>
<td><a href="#" >czc136#hotmail.com</a></td>
</tr>
</table>
</body>
</html>
<script>
function check(s){
window.returnValue =s;
window.opener=null;
window.close();
}
</script>
转自:http://www.zc36.net/c/javascript/08/192/789524_1.htm
|
 51cto三周年庆典 社区系列活动(购物卡、无忧币大派送!) |
|