if(){
  form1
}else if(){
  form2
}

解决方案 »

  1.   

    url 中 ?action=form1 或者 ?action=form2
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head><body>
    <form id="form1" name="form1" method="post" action="" style="display:none">
        form1
    </form>
    <form id="form2" name="form2" method="post" action="" style="display:none">
        form2
    </form>
    <script language="javascript">
    function get(s) {
    var uri = window.location.search;
    var re = new RegExp(s + '=([^&]*)');
    return re.test(uri) ? uri.match(re)[1] : null; 
    }document.getElementById(get('action')).style.display = '';
    </script>
    </body>
    </html>
      

  2.   

    if(){
      form1
    }else if(){
      form2
    }
    有没有实际例子给我看看
      

  3.   

    action值如何传过来的呀?能不能简单的写一下呢?
      

  4.   

    请在服务端决定该输出哪个form。
    ---
    基本问题请问身边的同事或查看参考资料