这里是我的代码:如何更新页面异步
<%@ 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>
<table>
<tr>
<td>
<input type="text" name="input" size="20" class="FormText" readonly />
<td />
<tr />
<tr>
<td>
<input type="button" name="one" value="1">
<td />
<tr />
</table>
</form>
</body>
</html>
当按下button 1在输入字段中显示1在同一页上我想要的。我知道这是通过Ajax实现的,但我无法做到。我阅读了很多文章,但没有任何帮助。
这不是使用AJAX的情况。这看起来更像是一个onclick事件http://www.w3schools.com/jsref/event_onclick.asp –