4.PassBackJsp
例 4.1
<%@ page contentType="text/html; charset=GBK"%>
<%@ page language="java"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
table.default {
width:510px;
}
table.default td {
border:1px solid black;
height:23px;
}
table.default td.item {
background:#006589;
color:#fff;
text-align:center;
}
</style>
<script type="text/javascript">
var xmlHttp;
function createXmlHttp() {
if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest(); //FireFox、Opera等浏览器支持的创建方式
} else {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");//IE浏览器支持的创建方式
}
}
function refreshCart() {
createXmlHttp();
xmlHttp.onreadystatechange = showCartIn;
xmlHttp.open("GET", "cart.jsp" , true);
xmlHttp.send(null);
}
ajax当中如何回传一个JSP?
猜你喜欢
转载自blog.csdn.net/mark_to_win/article/details/88682407
今日推荐
周排行