javascript-弹出窗口选择其内容并返回的例子
主页面代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>[url=http://www.zc36.net]网页技术[/url] [url]http://www.zc36.net[/url]</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>网页技术 [url]http://zc36.net[/url]</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="#" >[url=http://www.zc36.net]网页技术[/url]</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>
转自:[url=http://www.zc36.net/c/javascript/08/192/789524_1.htm]http://www.zc36.net/c/javascript/08/192/789524_1.htm[/url] |