日期:2014-05-16 浏览次数:20732 次
<script type="text/javascript">
function ajaxSubmit()
{
//创建XMLHttpRequest对象
var xmlhttp
try{
xmlhttp = new XMLHttpRequest();
}catch(e)
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
//创建请求结果处理程序
xmlhttp.onreadystatechange = function()
{
if(4 == xmlhttp.readyState)
{
if(200 == xmlhttp.status)
{
var date = xmlhttp.responseText;
Handling(date);
}else{
alert("error");
}
}
}
//打开连接,true代表异步提交
xmlhttp.open("get","luser.action?model=learnpace",true);
//当方法为POST时需要设置HTTP头
//xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
//当方法为POST时需要发送数据
//xmlhttp.send("model=learnpace");
}
function openwin()
{
if(window.confirm('请点击确定传参'))
{
ajaxSubmit();
return true;
}else{
return false;
}
}
</script>
<%
String model = request.getParameter("model");
System.out.println("model:" + model);
%>