=====show.htm=========
<form name="form1">
<input type=text name=t1>
<input type=text name=t2>
<input type=button name=b1 onclick="click1()">
</form>
<iframe id="getData" style="display:none;"></iframe><script>
function click1(){
document.all('getData').src="getData.php?row="+document.form1.t1.value;
}
</script>==========getData.php========
<? t1=$_GET['t1'];
//sql="select t2 from .... where ...=t1
//........
//从数据库中获得t2,自己写
?><script>parent.form1.t2.value=<?=t2;?>;
</script>
差不多就是这个意思,自己测试一下吧

解决方案 »

  1.   

    好长时间没写php程序了t1前面掉了$,丢脸...
      

  2.   

    就是使用frame来读取查询的页面。
      

  3.   

    用js可通过xmlhttp和任何有src属性的html对象向服务器发出信息可通过xmlhttp和frame、iframe、script标记及windwo.open方法与服务器交互
      

  4.   

    现在差不多已经实现了,试过三种办法,iframe,xmlhttp,js的src,最后还是用iframe来做了。后两种有局限性。给分了。