Rod*_*Rod 2 asp.net asp.net-mvc jquery
$('#div1').load(url,{id1 = ident1,id2 = ident2},function(){// Foo})
正在做一个帖子,而不是我认为应该得到的.有没有办法让它成为一个得到?
谢谢,棒.
从文档 " 如果数据作为对象提供,则使用POST方法;否则,假定为GET. "
使用jQuery.param首先序列化数据.
$('#div1').load(url, jQuery.param({
id1:ident1,
id2:ident2
}), function() {
// Foo
})
Run Code Online (Sandbox Code Playgroud)
刚刚注意到你的例子在语法上也是无效的.对象文字使用":"而不是"="来将对象键与其值相关联.