POST传值问题求助 获取username的值,拼到url后面 URL="/devno_select/b.php?username="+uname;在你的b.php中根据参数展示不就可以? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 问题再进一步描述下:a页面有:JS1:$(function(){ $('#username').blur(function(){ var parm =encodeURIComponent($("#username").val()); $.post("php.php",{username:parm},function(data,textStatus){ document.getElementById('userDep').value=data; },"text"); });});JS2:function LoadWindow2(){ URL="/devno_select/b.php"; loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100; loc_y=document.body.scrollTop+event.clientY-event.offsetY+170; window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:445px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");}文本框1:<input type="text" name="username" id="username">文本框2:<input type="text" name="userDep" id="userDep">文本框3: <input type="text" name="DeviceNum" id="DeviceNum" value="<?=$DeviceNum?>"> 按钮1:<input type="button" value="选 择" onClick="LoadWindow2()" title="选择编号" name="button">已经实现的效果:在文本框1输入姓名以后,会查询数据库并把部门值返回到文本框2里面。现在想实现的效果是:在文本框1输入姓名以后,文本框2自动带出部门(已实现),点击选择按钮,弹出窗口型b页面,b页面需显示的是根据文本框1传过来的值查询数据库后得到该人的设备编号列表请问该如何操作呢? 你可以在 b.php 中 通过window.dialogArguments.document.getElementById("username").value取值也可以URL="/devno_select/b.php?username=" + document.getElementById("username").value;window.showModalDialog(URL,self .....通过 url 参数传值 版主威武,解决问题哦。但还有一个小问题。b页面是这样的:<html><head><title>选择编号</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><frameset cols="*" rows="40,*" frameborder="YES" border="1" framespacing="0" id="bottom"> <frame name="query" src="query.php" scrolling="NO" frameborder="YES"> <frame name="devno_info" src="devno_info.php" frameborder="NO"> </frameset><noframes></noframes></frameset></html>需要的效果是:等于要在下面半截现在返回值。 来看看这个代码 foreach里调用方法出错 谁能帮我看下这分页函数哪錯了呢? 请问PHP连接ACCESS需要安装什么软件吗 新手 求一个SQL文 是MYSQL的数据库 望高手给于指导 马上给分 使用ob_flush提示:E_WARNING: Cannot modify header information - headers already sent 这语法什么意思 PHP转义字符问题 是怎么回事(有关php问题) 混蛋IE6 dedecms标签的解析代码写在哪里的 如何自动截取文章内容作为文章的简介
a页面有:
JS1:
$(function(){
$('#username').blur(function(){
var parm =encodeURIComponent($("#username").val());
$.post("php.php",{username:parm},function(data,textStatus){
document.getElementById('userDep').value=data;
},"text");
});
});JS2:
function LoadWindow2(){
URL="/devno_select/b.php";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:445px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}文本框1:
<input type="text" name="username" id="username">
文本框2:
<input type="text" name="userDep" id="userDep">
文本框3:
<input type="text" name="DeviceNum" id="DeviceNum" value="<?=$DeviceNum?>">
按钮1:
<input type="button" value="选 择" onClick="LoadWindow2()" title="选择编号" name="button">已经实现的效果:在文本框1输入姓名以后,会查询数据库并把部门值返回到文本框2里面。
现在想实现的效果是:在文本框1输入姓名以后,文本框2自动带出部门(已实现),点击选择按钮,弹出窗口型b页面,b页面需显示的是根据文本框1传过来的值查询数据库后得到该人的设备编号列表请问该如何操作呢?
window.dialogArguments.document.getElementById("username").value
取值也可以
URL="/devno_select/b.php?username=" + document.getElementById("username").value;
window.showModalDialog(URL,self .....
通过 url 参数传值
b页面是这样的:
<html>
<head>
<title>选择编号</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset cols="*" rows="40,*" frameborder="YES" border="1" framespacing="0" id="bottom">
<frame name="query" src="query.php" scrolling="NO" frameborder="YES">
<frame name="devno_info" src="devno_info.php" frameborder="NO">
</frameset><noframes></noframes>
</frameset>
</html>需要的效果是:
等于要在下面半截现在返回值。