document.form1.text.value
也可以

解决方案 »

  1.   

    <html>
    <head>
    <script language="javascript">
    function aa()
    {

    if(document.form1.text.value=="")
    {
    alert("不正确");
    }
    else
    {
    alert("正确");
    *****document.form1.action="javascript2.php?tt=<?$text?>"*********
    }
    }
    </script>
    </head><form name ="form1" action="from1">
    <input name="text" type="text" id="text">
    <input type="submit" name="submit" value="提交" onclick="javascript:aa();">
    </form>
    </html>
    我现在想把text的值传到下一个页面,怎么传啊?传完值之后在下一个页面怎么接值啊?
    谢谢,解决完马上结贴!!!
      

  2.   

    else
    {
    alert("正确");
             form1.submit();
    }
    <form name ="form1" action="javascript2.php?tt=<?php echo $text;?>" method="post">
    <input name="text" type="text" id="text">
    <input type="button" name="submit" value="提交" onclick="javascript:aa();">
      

  3.   

    javascript语句有错误啊,form1.submit();这句有错误!!