[ajax小问题]关于xmlHttp.open("POST", url, true),详细如下
var title=vbtrim(document.all.title.value);
var gpdm=escape(vbtrim(document.all.gpdm.value));
var url = "posttopic1.aspx?title= "+escape(title)+ "&message= "+escape(message)+ "&gpdm= "+gpdm;
xmlHttp.open( "POST ", url, true);
xmlHttp.onreadystatechange = updatePage;
xmlHttp.send(null);
如果 message 的内容很少,可以提交
如果message是一篇文章,则报错
*message是input的ID
你们说怎么办
------解决方案--------------------1。
var url = "posttopic1.aspx?title= "+escape(title)+ "&message= "+escape(message)+ "&gpdm= "+gpdm;
----------
这种是 GET方式,不式POST方式
2。
var title=vbtrim(document.all.title.value);
var gpdm=escape(vbtrim(document.all.gpdm.value));
var url = "posttopic1.aspx?title= "+escape(title)+ "&message= "+escape(message)+ "&gpdm= "+gpdm;
xmlHttp.open( "POST ", url, true);
xmlHttp.onreadystatechange = updatePage;
xmlHttp.send(null);
》》》
var title=vbtrim(document.all.title.value);
var gpdm=escape(vbtrim(document.all.gpdm.value));
var url = "posttopic1.aspx ";
xmlHttp.open( "POST ", url, true);
xmlHttp.onreadystatechange = updatePage;
var args = "title= "+escape(title)+ "&message= "+escape(message)+ "&gpdm= "+gpdm;
xmlHttp.send(args);