大概是一个JS。根据option的onchange事件改变value。不太记得了。去找一下吧。

解决方案 »

  1.   

    其实那个onchange其实也是一个提交
      

  2.   

    JS就能完成,不用PHP的`~~~~给你看段代码,是我做一个图库收集程序时用的~~~~应该对你有启发~~~<script language="JavaScript" type="text/JavaScript">
    function ChangeType()
    {
    if(this.document.form.filetype.value==0)
    {
    this.document.all.neturl1.style.display="";
    this.document.all.upfile1.style.display="none";
    this.document.all.neturl2.style.display="";
    this.document.all.upfile2.style.display="none";
    }
    else
    {
    this.document.all.neturl1.style.display="none";
    this.document.all.upfile1.style.display="";
    this.document.all.neturl2.style.display="none";
    this.document.all.upfile2.style.display="";
    }
    }
    function InitPage()
    {
    this.document.all.neturl1.style.display="";
    this.document.all.upfile1.style.display="none";
    this.document.all.neturl2.style.display="";
    this.document.all.upfile2.style.display="none";
    }
    </script>
        <tr> 
          <td width="11%">上传方式:</td>
          <td width="89%"><select name="filetype" id="filetype" class="TableLine" onChange="ChangeType();">
              <option value="0" selected>网络地址</option>
              <option value="1">上传文件</option>
            </select> </td>
        </tr>
        <tr> 
          <td width="11%"><div id="neturl1">网络地址:</div><div id="upfile1">上传图片:</div></td>
          <td width="89%"><div id="neturl2"><input name="neturl" type="text" class="TextBox" id="neturl"></div><div id="upfile2"><input type="file" name="upfile" class="TextBox"></div></td>
        </tr>