首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

js不使用jquery,调用ajax,传递数组,并接受,解决方案

2013-11-15 
js不使用jquery,调用ajax,传递数组,并接受, String[] type new String[6] int i 0 while(rs.next()){

js不使用jquery,调用ajax,传递数组,并接受,
 String[] type = new String[6];
 int i =0;
 while(rs.next()){
 type[i]=rs.getInt(1)+"";
 i++;
 }
 out.print(type);  这是ajax需要传递的数组,

function  DoResponse(){
if(xmlHttp.readystate==4){
if(xmlHttp.status==200){
var type =xmlHttp.responseText;  这是接受代码  是不是出问题了?我传递一个字符串可以收的,但是传递一个数组,过来就是空的,
普通字符串都能传递过去,难道数组转成字符串就不能传递过去了??太神奇了吧。

热点排行