环境:mysql5.0.22、eclipse j2ee LUNA
先看mysql数据
配置input.jsp查询条件的jsp文件(并且反馈回的页面也是input.jsp文件、ay数组遍历出的结果)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form id="myForm">
userName:<input type="text" name="id" /> <input type="button"
value="submit" id="btn">
</form>
<div >
<div id="show_name"></div>
<div id="show_age"></div>
<div id="show_addr"></div>
</div>
</body>
<script type="text/javascript">
var oBtn = document.getElementById("btn");
oBtn.onclick = function() {
var oInput = doc