function save(){
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+,Firefox,Chrome,Opera,Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6,IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
alert("ppp");
var deviceImgDate = document.getElementById("deviceImgDate").value;
var deviceCheck1 = document.getElementById("deviceCheck1").value;
var deviceCheck2 = document.getElementById("deviceCheck2").value;
var deviceCheck3 = document.getElementById("deviceCheck3").value;
var deviceCheck4 = document.getElementById("deviceCheck4").value;
var deviceCheck5 = document.getElementById("deviceCheck5").value;
var deviceCheck6 = document.getElementById("deviceCheck6").value;
var deviceCheck7 = document.getElementById("deviceCheck7").value;
var deviceCheck8 = document.getElementById("deviceCheck8").value;
var deviceCheck9 = document.getElementById("deviceCheck9").value;
var deviceCheck10 = document.getElementById("deviceCheck10").value;
var deviceCheck11 = document.getElementById("deviceCheck11").value;
var deviceCheck12 = document.getElementById("deviceCheck12").value;
var deviceCheck13 = document.getElementById("deviceCheck13").value;
var deviceCheck14 = document.getElementById("deviceCheck14").value;
var deviceCheck15 = document.getElementById("deviceCheck15").value;
var deviceScope = document.getElementById("deviceScope").value;
var url="deiviceImgCheckServlet?deviceImgDate="+encodeURI(deviceImgDate)+"&deviceCheck1="+encodeURI(deviceCheck1)
+"&deviceCheck2="+encodeURI(deviceCheck2)+"&deviceCheck3="+encodeURI(deviceCheck3)+"&deviceCheck4="+encodeURI(deviceCheck4)
+"&deviceCheck5="+encodeURI(deviceCheck5)+"&deviceCheck6="+encodeURI(deviceCheck6)+"&deviceCheck7="+encodeURI(deviceCheck7)
+"&deviceCheck8="+encodeURI(deviceCheck8)+"&deviceCheck9="+encodeURI(deviceCheck9)+"&deviceCheck10="+encodeURI(deviceCheck10)
+"&deviceCheck11="+encodeURI(deviceCheck11)+"&deviceCheck12="+encodeURI(deviceCheck12)+"&deviceCheck13="+encodeURI(deviceCheck13)
+"&deviceCheck14="+encodeURI(deviceCheck14)+"&deviceCheck15="+encodeURI(deviceCheck15)+"&deviceScope="+encodeURI(deviceScope);
alert(url);
xmlhttp.open("post",url,true);
xmlhttp.send(null);
alert("aaa");
window.location.reload();
}
jsp: servlet/MsgServlet?userName=encodeURI('张三'),用encodeURI方法处理的都是UTF-8的 servlet: URLDecoder.decode(request.getParameter("userName").getString(),"UTF-8"));
总结
如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。