A.htm
<!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=utf-8" />
<script language="JavaScript">
function name_pic(obj){
var text = new Object();
obj.focus();
var range =obj.document.selection.createRange();
text.a = obj.dd_name.value;
showModalDialog('B.htm',text,'dialogWidth:400px; dialogHeight:310px; status:0;help:0;');
obj.dd_name.value=text.a;
}
</script>
<title>無標題文件</title>
</head><body>
<form id="form1" name="form1" method="post" action="">
<label>NAME
<input type="text" name="dd_name" id="dd_name" />
</label>
<label>
<input type="button" name="button" id="button" value="開啟子視窗" onclick="return name_pic(form1)"/>
</label>
</form>
</body>
</html>
B.htm
<!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=utf-8" />
<SCRIPT language=JavaScript event=onclick for=Okinset>
var object = window.dialogArguments;
object.a = dd_name.value
window.close();
</SCRIPT><title>無標題文件</title>
</head><body>
<table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC1" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC2" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC3" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC4" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC5" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC6" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC7" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC8" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC9" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC10" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
</table>
</body>
</html>
<!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=utf-8" />
<script language="JavaScript">
function name_pic(obj){
var text = new Object();
obj.focus();
var range =obj.document.selection.createRange();
text.a = obj.dd_name.value;
showModalDialog('B.htm',text,'dialogWidth:400px; dialogHeight:310px; status:0;help:0;');
obj.dd_name.value=text.a;
}
</script>
<title>無標題文件</title>
</head><body>
<form id="form1" name="form1" method="post" action="">
<label>NAME
<input type="text" name="dd_name" id="dd_name" />
</label>
<label>
<input type="button" name="button" id="button" value="開啟子視窗" onclick="return name_pic(form1)"/>
</label>
</form>
</body>
</html>
B.htm
<!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=utf-8" />
<SCRIPT language=JavaScript event=onclick for=Okinset>
var object = window.dialogArguments;
object.a = dd_name.value
window.close();
</SCRIPT><title>無標題文件</title>
</head><body>
<table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC1" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC2" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC3" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC4" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC5" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC6" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC7" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC8" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC9" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input name="dd_name" type="text" id="dd_name" value="ABC10" /><input name="Okinset" type="button" id="Okinset" value="插入" />
</form></td>
</tr>
</table>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货