求点击"会员列表"按钮,弹出窗口可以选择的示例代码 点击"会员列表"按钮,弹出窗口可以选择,根据列表选择自动在文本框内,然后确定,自动返回到页面如下图,点击会员列表按钮弹出窗口如图,根据会员列表点击会员名可以自动到上边的文本框,然后关闭这个弹出窗口,会员列表按钮旁边的文本框就有内容了需求这样类似的代码示例, 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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> <title>父页面</title></head><body>指定用户名:<input id="Text1" type="text" /><input id="Button1" type="button" value="会员列表" onclick="window.open('../JS/Child.htm')" /></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> <title>无标题页</title></head><body><p>这里是子窗口</p><input id="txt2" type="text" value="ws_hgo" /><input id="Button1" type="button" value="返回父窗口" onclick="window.opener.document.getElementById('Text1').value=document.getElementById('txt2').value;window.close()" /></body></html> MainPage.html<html xmlns="http://www.w3.org/1999/xhtml" ><head> <title></title> <script language="javascript"> function ChooiceOne() { var value = window.showModalDialog("UserList.html","xxx"); document.getElementById('txtName').value = value; } </script></head><body><label>姓名:<input type="text" id="txtName" /></label><input type="button" onclick="ChooiceOne();" /></body></html>UserList.html页<html xmlns="http://www.w3.org/1999/xhtml" ><head> <title></title> <script language="javascript"> function selectOne(link) { // this.opner.document.getElementById("txtName").value = "xx"; window.returnValue = link.innerHTML; window.close(); } </script></head><body><a href="#" onclick="selectOne(this);">唐sir</a><br /><a href="#" onclick="selectOne(this);">孙大</a></body></html> easyui datagrid某列绑定下拉列表 如何修改IE窗口的显示内容 JS判断当前URL 有人用过"Damn Small Rich Text Editor"吗? 怎样取div控件里的text控件的id值 求一段代码!求要我都写在里面了,帮忙啊! 为何 <body onload="window.open('test1.htm','title....)>为什么不能弹开一个页面 请问在客户端怎么处理日期数据?比如日期验证等 这句简单的Select Case为什么不行呢? 请问用Javascript怎样实现一个进度条? 子页面刷新父页面的问题 Json 的 Key中含有空格,怎么取
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>父页面</title>
</head>
<body>
指定用户名:<input id="Text1" type="text" />
<input id="Button1" type="button" value="会员列表" onclick="window.open('../JS/Child.htm')" />
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
</head>
<body>
<p>这里是子窗口</p>
<input id="txt2" type="text" value="ws_hgo" />
<input id="Button1" type="button" value="返回父窗口" onclick="window.opener.document.getElementById('Text1').value=document.getElementById('txt2').value;window.close()" />
</body>
</html>
<head>
<title></title>
<script language="javascript">
function ChooiceOne() {
var value = window.showModalDialog("UserList.html","xxx");
document.getElementById('txtName').value = value;
}
</script>
</head>
<body>
<label>姓名:<input type="text" id="txtName" /></label><input type="button" onclick="ChooiceOne();" />
</body>
</html>UserList.html页<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<script language="javascript">
function selectOne(link) {
// this.opner.document.getElementById("txtName").value = "xx";
window.returnValue = link.innerHTML;
window.close();
}
</script>
</head>
<body>
<a href="#" onclick="selectOne(this);">唐sir</a>
<br />
<a href="#" onclick="selectOne(this);">孙大</a>
</body>
</html>