日期:2014-05-16 浏览次数:20849 次
function ajaxReq(){
var url = "ChatRoomServlet";
var param = "fname=${param.fname}&tname=${param.tname}";
new Ajax.Request(url,{
?method:"get",
?parameters:encodeURI(param),
?requestHeaders:['Cache-Control','no-cache','If-Modified-Since','0'],
??? onSuccess:function(httpObj){
??? ?$("chatarea").value = httpObj.responseText;
??? },
??? onFailure:function(httpObj){
??? }
});
?
?
String fname = request.getParameter("fname");
fname = new String(fname.getBytes("ISO-8859-1"),"UTF-8");
?
?