我想将数据上传到服务器。它通过了,这将返回,我该怎么办?请帮我
代码只是示例
but4.addEventListener('click',function(){
var xhr = Titanium.Network.createHTTPClient({
timeout : '15000',
});
xhr.onload = function (){
Titanium.API.info('onload');
Ti.API.info('Sucess'+ this.status + ' '+ this.readyState);
};
xhr.onerror = function(){
Ti.API.info('error');
res.hide();
};
xhr.ondatastream=function(){
Ti.API.info('ondatastream');
};
var abc1 = 'iPhone_request=<category><name>game_abc</name></category>';
xhr.open('POST','http://www.imobdevtech.com/assignments/uploadcategory.php');
xhr.send(abc1);
});
提前致谢,