是params部分中的写法语法吗?我想添加此字段以发送到服务器但不能正常工作
Ext.Ajax.request({
url:'http://localhost:8084/org.servlet/url_servlet',
method:'GET',
params:{
myname:document.getElementById('firstname').value//this is the field i want to send to the servlet
} ,
success: function (response){
Ext.Msg.alert('Succesfully added ');
},
failure: function (){
Ext.Msg.alert('Error in server');
}
答案 0 :(得分:1)
你可以用ajax
来做示例代码
Ext.Ajax.request({
url: 'page.php',
params: {
id: 1
},
success: function(response){
var text = response.responseText;
// process server response here
}
});