这种POST设计模式不太合常理,你应该做两个INPUT TEXT
一个是
<input name="athor" type="text" /> 
一个是
<input name="subject" type="text" /> 一个显示的同时一个隐藏style="display:none"
而且应避免INPUT TEXT的NAME和RADIO的NAME相同。

解决方案 »

  1.   

    还是根据选择来创建INPUT吧<form action="search.php" method="post"> <input name="athor" type="radio" onclick="f(this.name)"> 
    <input name="subject" type="radio" onclick="f(this.name)"> <div id="text"></div>
    </form>
    <SCRIPT LANGUAGE="JavaScript">
    function f(name)
    {
    document.getElementById("text").innerHTML ="<input type='text' name='"+name+"'>"
    }
    </SCRIPT>
      

  2.   

    <form action="search.php" method="post"> <input name="chk" value="athor" type="radio" onclick="if(this.checked)form.txt.name=this.value"/> 
    <input name="chk" value="subject" type="radio" onclick="if(this.checked)form.txt.name=this.value"/> <input id="txt" name="athor" type="text" /> 
    </form>