日期:2014-05-17  浏览次数:20880 次

JSP页面中有些获取不到值 不知道怎么回事求解谢谢各位了
这是修改页面
JScript code
<%@ page contentType="text/html; charset=gbk" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.wgh.DB.connDB"%>
<%@ page import="com.wgh.DB.chStr"%>
<jsp:include page="safe.jsp"/>
<%
connDB conn=new connDB();
chStr chStr=new chStr();
    String PID="";
    String userName="";
    String trueName="";
    String city="";
    String address="";
    String postcode="";
    String cardNO="";
    String cardType="";      
    float Amount=0;
    String tel="";
    String email=""; 
PID=request.getParameter("ID");
if (PID!=null && PID!=""){
    int ID=Integer.parseInt(PID);
    ResultSet rs=conn.executeQuery("select * from tb_member where ID="+ID);
    if(!rs.next()){
        out.println("<script lanuage='javascript'>alert('您的操作有误!');window.location.href='membermanage.jsp';</script>");
    }else{
        userName=rs.getString("userName");    //用户名
        trueName=rs.getString("trueName");    //真实姓名     都有值啊
        city=rs.getString("city");        //城市
        address=rs.getString("address");    //地址
        postcode=rs.getString("postcode");    //邮编
        cardNO=rs.getString("cardNO");        //证件号            都有值啊
        cardType=rs.getString("cardType");      //证件类型            都有值啊
        Amount=rs.getFloat("Amount");            //消费额        
        tel=rs.getString("tel");        //电话 
        email=rs.getString("email");    //email    
    }
%>
<html>
<head>
<title>酷腾电子商城后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<link href="../CSS/style.css" rel="stylesheet">
<script src="onclock.JS"></script>

<script language="javascript">
function mycheck(){
    if (form1.username.value==""){
        alert("请输入用户名称!");form1.username.focus();return;
    }
    if (form1.Truename.value==""){
        alert("请输入真实姓名!");form1.Truename.focus();return;
    }
    if (form1.city.value==""){
        alert("请输入城市!");form1.city.focus();return;
    }
    if (form1.address.value==""){
        alert("您输入的地址!");form1.address.focus();return;
    }    
    if (form1.postcode.value==""){
        alert("请输入邮政编码!");form1.postcode.focus();return;
    }
    if (form1.cardNO.value==""){
        alert("请输入证件号码!");form1.cardNO.focus();return;
    }
    if (form1.cardType.value==""){
        alert("请输入证件类型!");form1.cardType.focus();return;
    }
    
    if (form1.tel.value==""){
        alert("请输入电话!");form1.tel.focus();return;
    }
    if (form1.email.value==""){
        alert("请输入email!");form1.email.focus();return;
    }        
    if (form1.Amount.value==""){
        alert("请输入消费额!");form1.Amount.focus();return;
    }
    //form1.submit();
}
</script>

</head>
<body  onLoad="clockon(bgclock)"> 
<table width="777" height="192"  border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
<tr>
  <td>
<jsp:include page="banner.jsp"/>
<table width="777" height="288"  border="0" align="center&qu