提出来的是问题 $name可以被赋值 但语句应该改为:window.open('123.php?name='+this.value);session好象不能传递到新打开的窗口 或许可以 但我不知道怎么作 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 一个是客户端,一个是服务端,在不提交abc.php的情况下,$name的值是不可以通过session传的。 php兄弟也成了早起的鸟儿了,hehe phpteam(George)兄:有没有其他办法传过去呢?(前提是:还是不能提交) 上边小弟我没有把问题说清楚,帅哥靓姐请看这个:我有两个页面, 第一个页是:first.php 其中有: <body><form name=scsp> <input type=text name=t4 value="" onkeydown=" if(event.keyCode==13){window.open('report.php?'+this.value,'report');}"></form></body> 当我在上边的文本框中输入aaa并按下回车键打开新窗口页面后,在新窗口的地址栏里显示的是:http://192.168.0.1/report.php?aaa。 第二个页是:(即first.php用window.open打开的) report.php内容如下: <html><head> <script> window.onload=function() { var arr=window.location.search.split("?") if(arr.length>1) document.aaa.up.value=arr[1]; } function ret() { window.opener.document.scsp.t4.value=rep.t_name.value window.close() } </script></head> <body> <? if($send<>"send") { ?> <form><input type=text name=up> <input type=submit name=send value="send"> <? } else { $id=mssql_connect('server','sa'); $db=mssql_select_db('db1'); $query="select t_name,t_pyname,t_age,t_city from dtable where t_pyname like '$up' "; $result=mssql_query($query); ?> <table> <? while($r=mssql_fetch_array($result)) {?> <form action="" name="rep" method="post"> <tr><td><input type="submit" name="t_name" value="<? echo $r[t_name]; ?>" onclick="ret()"></td></tr> <? } } ?> </table></body></html> 在report.php中,当我点击send按钮后虽然查询出了我想得到的数据,但地址栏却变成了:http://192.168.0.1/report.php?PHPSE...p=aaa&send=send 我的本意是想当我点击上边那个submit的按钮后,传回该按钮的值到report.php的opener(即first.php页面,不是提交,是传到第一个窗口) 问:上边的代码不能实现我的本意!该如何做呢?? 望高手大哥大姐帮忙详细指点一番!! 出发点是:具体举个例:数据库表中:name pyname李明 LM在第一页的文本框中输入一个对应数据库字段(pyname)的值传到下页中去,做个查询,查出数据库表中,类似LM的所有记录。再显示查询结果的页面中,点击一个值为数据库表中值的按钮,再回写到调用者页面上去。 若干年后我才开始看smarty... php不是很懂。这个问题太难了!! _get_script_url() discuzx2中得到当前url的方法实现细节? .net代码转成php的问题 PHP连接ORACEL9I 编码问题 急!!! php 如何实现asp 的application 对象! 还有如何统计同时在线人数? php怎样实现文件上传? session丢失问题 关于zend的菜问题 可否同时把许多文件上传到mysql数据库,也就是说一次选中多个文件然后循环放到数据库。
第一个页是:first.php
其中有:
<body><form name=scsp>
<input type=text name=t4 value="" onkeydown=" if(event.keyCode==13){window.open('report.php?'+this.value,'report');}"></form></body>
当我在上边的文本框中输入aaa并按下回车键打开新窗口页面后,在新窗口的地址栏里显示的是:http://192.168.0.1/report.php?aaa。
第二个页是:(即first.php用window.open打开的)
report.php内容如下:
<html><head>
<script>
window.onload=function() {
var arr=window.location.search.split("?")
if(arr.length>1)
document.aaa.up.value=arr[1];
}
function ret() {
window.opener.document.scsp.t4.value=rep.t_name.value
window.close()
}
</script></head>
<body>
<? if($send<>"send") { ?>
<form><input type=text name=up>
<input type=submit name=send value="send">
<? } else {
$id=mssql_connect('server','sa');
$db=mssql_select_db('db1');
$query="select t_name,t_pyname,t_age,t_city from dtable where t_pyname like '$up' ";
$result=mssql_query($query);
?>
<table>
<? while($r=mssql_fetch_array($result)) {?>
<form action="" name="rep" method="post">
<tr><td><input type="submit" name="t_name" value="<? echo $r[t_name]; ?>" onclick="ret()"></td></tr>
<? } } ?>
</table></body></html> 在report.php中,当我点击send按钮后虽然查询出了我想得到的数据,但地址栏却变成了:http://192.168.0.1/report.php?PHPSE...p=aaa&send=send
我的本意是想当我点击上边那个submit的按钮后,传回该按钮的值到report.php的opener(即first.php页面,不是提交,是传到第一个窗口) 问:上边的代码不能实现我的本意!该如何做呢??
望高手大哥大姐帮忙详细指点一番!!
具体举个例:数据库表中:name pyname
李明 LM
在第一页的文本框中输入一个对应数据库字段(pyname)的值
传到下页中去,做个查询,查出数据库表中,类似LM的所有记录。再显示查询结果的页面中,点击一个值为数据库表中值的按钮,再回写到调用者页面上去。