对ajax不懂 对js也不太懂 有这样一个问题 代码是模仿的alax.js//读取输入框内容 
function fun_repass() { 
 var f=document.myform.repass.value; 
 var f2=document.myform.pass.value;
 alert(f2);
 S_xmlhttprequest(); //实例化一个alax
xmlHttp.open("GET","pass.php?id=+f&ik=+f2",true); 
xmlHttp.onreadystatechange =byphp_pass; 
xmlHttp.send(null); 
}pass.php
 <?phpif($_GET['id']&&$_GET['ik']){
  $pass=$_GET['id'];
  $repass=$_GET['ik'];
  if($pass==$repass)
      {
 echo '密码完全正确!';;
 
       }
}?>为什么页面输不出'密码完全正确!'

解决方案 »

  1.   

    不会js,用jquery的ajax吧,比较适合对js不熟的人
      

  2.   

    这段代码 有问题吧 xmlHttp.open("GET","pass.php?id=+f&ik=+f2",true);  
      

  3.   

    f($_GET['id']&&$_GET['ik']){
      $pass=$_GET['id'];
      $repass=$_GET['ik'];
      if($pass==$repass)
      {
    echo '密码完全正确!';//;
      
      }
    else{
    echo '$pass';//把else输出看看
    }
    }
      

  4.   

    xmlHttp.open("GET","pass.php?id="+f+"&ik="+f2,true);