gh296833139 2011-10-08 10:59
浏览 228
已采纳

请教各位大虾 表单提交的问题

我的jsp页面
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">



'> function selectMember(url,name,width,height) { var name = "选择客户"; var iWidth = 1000; //弹出窗口的宽度; var iHeight = 720; //弹出窗口的高度; var iTop = (window.screen.availHeight-30-iHeight)/2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置; window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no'); }




")'>选择客户

                <tr>
                    <td></td>
                    <td class="btn">
                        <input type="button" value="提交" onclick="sub();"/>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript">
function getvalue(){
    var cardType = document.getElementById("cardType").value;
    document.getElementById("openAmount").value="";
    document.getElementById("tip_openAmount").innerHTML = "";
    if(cardType == 1){
        document.getElementById("a").style.display="inline";
        document.getElementById("b").style.display="none";
    }else{
        document.getElementById("b").style.display="inline";
        document.getElementById("a").style.display="none";
    }       
}
    function sub(){
        if(isEmptyById("cardNum")){
            show("tip_cardNum");
            return;
        }else{
            hide("tip_cardNum");
        }
        if(document.getElementById("custommerManager.id").value == ""){
                show("tip_custommerManagerId");
                return;
            }else{
                hide("tip_custommerManagerId");
            }
        var cardType = document.getElementById("cardType").value;
        var a = document.getElementById("a").value;
        var b = document.getElementById("b").value;
        if(cardType==1){
        document.getElementById("openAmount").value=a;
        }
         if(cardType==2){
        document.getElementById("openAmount").value=b;
        }
        var openAmount = document.getElementById("openAmount").value;
        //alert(openAmount);
        if(openAmount==""){
        document.getElementById("tip_openAmount").innerHTML ="";
        document.getElementById("tip_openAmount").innerHTML ="请输入金额";
        document.getElementById("tip_openAmount").style.display="inline";
                        return;
        }else{
        document.getElementById("tip_openAmount").style.display="none";
        }

        if(cardType==1){
            if(openAmount==1000||openAmount%1000==0 ||openAmount!=0){
            document.getElementById("tip_openAmount").style.display="none";
            }else{
            document.getElementById("tip_openAmount").innerHTML ="";
            document.getElementById("tip_openAmount").innerHTML ="红卡用户金额为1000或1000倍数";
            document.getElementById("tip_openAmount").style.display="inline";
                        return;
            }
        }       

        if(confirm("尊敬的用户,您是否确认激活该卡?")){
            document.forms[0].submit(); 
        }
    }
</script>


我提交后 没有反应

  • 写回答

4条回答 默认 最新

  • fxmabo 2011-10-08 14:41
    关注

    这个应该是你日期控件使用的有问题,把日期控件代码发来看看,可能你那个日期控件的名称或者类型需要特殊设置。如果设置的是错的可能提交的是''或者undifined。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?