js用ajax和后端数据交换

用的springMVC mybatis,小弟刚学js不会写

form name="loginForm" >























&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp宠物管理系统

用户名:
密&nbsp码:
&nbsp&nbsp&nbsp&nbsp主人

商店
&nbsp&nbsp&nbsp&nbsp

&nbsp&nbsp

http://blog.csdn.net/smartsmile2012/article/details/17220413

参考.

$.ajax({
cache: true,
type: "POST",
url:ajaxCallUrl,
data:$('#yourformid').serialize(),// 你的formid
async: false,
error: function(request) {
alert("Connection error");
},
success: function(data) {
$("#commonLayout_appcreshi").parent().html(data);
}
});

                    后台直接getparameter("name") 获取input里面的值了

jQuery的比较简单容易理解

 $.get(url,callback);
 $.get('123.com?id=1&name=2',function(data){......});
 $.post(url;data,callback);
 $.post('123.com',{id:1,name:2},function(data){.....});