在进行form提交时,使用的是post提交,提交的数据量很大。
我用的是IE6,结果发现action不能执行,报错报的是无效的语法。
用一个IE8的机器测试,结果是正确的,可以执行action。
这是为什么啊,请朋友们帮我分析下!

解决方案 »

  1.   

    我在用IE6情况下,把提交的List数据条数减少,就能正常执行,List要是过大就会报错
      

  2.   

    应该是你写的js不兼容ie6的贴你页面代码
      

  3.   

    addForm.action="addCardType.do";
    alert("执行了");
    addForm.submit();最后的addForm.submit();没有执行! 就出错了!说是无效的语法!
      

  4.   

    下面资料仅供参考,不知是否是你的问题微软官方关于【当您尝试使用 POST 方法或 GET 方法来传递在 Internet 浏览器 7 中或在 Internet 浏览器 6 中的网页中的表单数据时,可能会出现问题】的解释
    http://support.microsoft.com/?scid=kb;zh-cn;939941&x=14&y=12
      

  5.   

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
    <%@page import="com.asun.common.bean.UserState"%>
    <%@ taglib prefix="s"  uri ="/struts-tags"%> 
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <title>项目一览</title>
       <link rel="stylesheet" type="text/css" href="../css/common/common.css">
       <script language="javascript" type="text/javascript" src="../javascript/common/json.js"></script>
    <script language="javascript" type="text/javascript" src="../javascript/common/ajax.js"></script>
       <script type="text/javascript">
       function getFormulaInfo() {
    doPostRequest('getFormulaInfo.do', getBodyByForm(addForm), returnFormulaInfo, returnValueErrorHandler);
       }
      
       function returnFormulaInfo(str) {
      var json = str.parseJSON();
      var array=(json.reason).split(":");
       document.getElementById("rechargeMin").value=array[0];
       document.getElementById("giftMoney").value=array[1];
       document.getElementById("giftPoints").value=array[2];
       }
       function returnValueErrorHandler() {

    }
    function addCardType() {
    addForm.action="addCardType.do";
    alert("22");
    addForm.submit();
    }
       </script>
      </head>
      <body onload="selectmenu('div_menusub5','subbtn30','SubDown30')">
    <div id="div_container">
       <form name="addForm" action="post" enctype="multipart/form-data">
       <!-- 上方一二级菜单 -->
    <jsp:directive.include file="/page/menu/menu.jsp" />
    <!-- 左侧三级菜单 -->
       <div id="div_control">
       <div style="width:80px;height:120px;position:absolute;top:20;left:20px;font-size:8pt">
       <input type="button" value="保存" onclick="addCardType()">
    </div>
       </div>
       <!-- 上方状态栏 -->
    <div id="div_state">
    <jsp:include page="../status/StatusBar.jsp"/>
       </div>
       <!-- 工作区 -->
       <div id="div_operate">
    <div id="div_tablecont">
    <input type="hidden" name="msId">
    <input name="mbrBargain" type="hidden">
    <table class="data_table">
    <tr>
    <th width="106px" align="right">卡类型名称&nbsp;&nbsp;</th><td><input id="cardName" name="cardName" ></td>
    <th width="106px" align="right">充值方案&nbsp;&nbsp;</th>
    <td align="left">
    <select name="formulaId" onchange="getFormulaInfo()">
    <s:iterator value="formulaNameList">
    <option value="<s:property value="MF_Id"/>"><s:property value="MF_Name"/></option>
    </s:iterator>
    </select>
    </td>
    </tr>
    <tr>
    <th width="106px" align="right">最小充值金额&nbsp;&nbsp;</th>
    <td style="text-align: left">
    <input id="rechargeMin" readonly="readonly" value="0">
    </td>
    <th width="106px" align="right">赠送金额&nbsp;&nbsp;</th>
    <td style="text-align: left">
    <input id="giftMoney" readonly="readonly" value="0">
    </td>
    </tr>
    <tr>
    <th width="106px" align="right">赠送积分&nbsp;&nbsp;</th>
    <td><input id="giftPoints" readonly="readonly" value="0"></td>
    <th width="106px" align="right"></th>
    </tr>
    </table>
    <span style="font-size:10pt;color:blue">对应项目折扣:</span>
    <table class="data_table">
    <tr>
    <th>No.</th>
    <th style="width: 200px">项目名称</th>
    <th style="width: 200px">折扣</th>
    </tr>
    <s:iterator value="subjectList" status="stat">
    <tr>
    <td><s:property value="#stat.index+1"/></td>
    <td style="width: 200px">
    <input value="<s:property value="MS_Name"/>" readonly="readonly">
    <input name="mbrBargain[<s:property value="#stat.index"/>].MB_Subject" value="<s:property value="MS_Id"/>" type="hidden">
    </td>
    <td style="width: 200px"><input name="mbrBargain[<s:property value="#stat.index"/>].MB_Discount" value="1"></td>
    </tr>
    </s:iterator>
    </table>
    </div>
    </div>
    </form>
    </div>
      </body>
    </html>
      

  6.   

    <form name="addForm" action="post" enctype="multipart/form-data"> 你这是用post提交的??好象是get吧 默认为get 
    试试这个
    <form name="addForm" action="post" method=“post” enctype="multipart/form-data"> 
      

  7.   

    哈哈哈!还是你厉害!眼睛好使!我真二了!
    我咋把 method=“post”写成了action="post"。这错误太低级了。哈哈!
    谢谢了!