日期:2014-05-16  浏览次数:20579 次

我在php下用jquery的ajax,向对方请求处理结果(对方是java),无返回值
我的页面写: 
url_pay ="http://10.21.16.128:18080/mobileBank/PostalServlet";

$.post(url_pay,{"tranCode":tranCode,"orderId":orderId,"mobile":mobilephone,"content":content,"totalAmount":totalAmount,"merchantId":merchantId,"storeId":storeId,"storeName":storeName,"salesId":salesId,"validCode":validCode,"userid":'jiangjun'},function(data1){
alert(data1);})

没有返回值 ,即alert(data1)无反应

但对方的java环境,用out.print(),能够打印出值来,因为我在地址栏里面输入http://10.21.16.128:18080/mobileBank/PostalServlet?tranCode=00001&orderId=182333&mobile=13522468117&content=ceshiorder&totalAmount=12.54&merchantId=456&storeId=67&storeName=mianbao&salesId=68&validCode=098765&userid=zhangsan 

能够返回1

------解决方案--------------------
楼主用$.ajax试试看