jsp 页面传值后 不显示
登陆界面
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript" src="./jquery/jquery-1.8.0.js"></script>
<link href="./css/table_css.css" type="text/css" rel="stylesheet">
<script type="text/javascript">
$(document).ready(function(){
$(":button").click(function(){
if($("#serv").attr("value")=="")
{
alert("服务器名称为空");
return;
}
if($("#name").attr("value")=="")
{
alert("登录名为空");
return;
}
if($("#pass").attr("value")=="")
{
alert("密码为空");
return;
}
else {
var params=$("form").serialize();
var Url="main/loading.action";
$.ajax({
type:"post",
url:Url,
data:params,
datatype:"json",
success:function(data){
alert(data.li);
window.location="showName.jsp?id="+data.li+"";
},
error:function(){
window.location="loginFail.jsp";
}
});
}
});
});
function showPass(o)
{
if(o.checked)
{
var text=$(o).parent().children().eq(0).val();
$("#pass").remove();
$("#span").remove();
var htm="<input id='pass' type='text' name=\"dataMap['passWord']\" value='"+text+"'/><span width='30px' id='span'> <span>";
$(o).before(htm);
}
else
{
var text=$(o).parent().children().eq(0).val();
$("#pass").remove();
$("#span").remove();
$(o).before("<input id='pass' type='passWord' name=\"dataMap['passWord']\" value='"+text+"'/><span width='30px' id='span'> </span>");
}
}
</script>
</head>
<body>
<form>
<table align="center" class="bordered" id="reg">
<tr><td>服务器类型:</td><td><select name="dataMap['dataType']" width="500px"><option value="MySql">MySql</option><option value="SqlServer">SqlServer</option></select></td></tr>
<tr><td>服务器名称:</td><td><input type="text" name=