<a href="#" onclick="location.href='cheshi.php?ID='+document.all.text.value" >link</a>

解决方案 »

  1.   

    to:uGain(uGain.org),你的方法不行啊,地址栏里显示ID=undefined
      

  2.   

    document.all.text.value
    text是你定的input的name
      

  3.   

    <a href="#" onclick="location.href='cheshi.php?ID='+document.all.text.value" >link</a>
    没有问题啊多个值 用 
    <a href="#" onclick="location.href='cheshi.php?ID='+document.all.text.value + '&NAME=' +
    document.all.name.value " >link</a>
      

  4.   

    index.html
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="index.php">
    <input type="text" name="d">
    <input type="submit" name="Submit" value="Submit">
    </form>
    </body>
    </html>
    index.php
    <?
    echo $d;
    ?>
    用php+apache
      

  5.   

    to:uGain(uGain.org 我能看明白你的意思,我再试试
    TO:hyw2008(游子意)  表单提交的方法的确能解决很多问题,不过能实现JS取值还是很有用
      

  6.   

    to:uGain(uGain.org 今天试了你的方法,完全可以,哪天不知道哪里出错了就是不行,这功能很有用,谢谢各位的帮组!!