我试图在jquerymobile中的更改页面上传递一个函数,但是我得到一个指向$ .ajax的错误
$( ":mobile-pagecontainer" ).pagecontainer(
"change",
"#schoolperformance",
{ reload : true, showLoadMsg : false,
$.ajax({
type: 'POST',
url: "custom/php/showinfo.php",
success: function(data){
$("#new").html(data)
},
error: function(){ //on error
console.log('failed to successifuly destroy');
}
});
});
答案 0 :(得分:0)
如果没有函数并且change
不接受$(":mobile-pagecontainer").pagecontainer({
change: function(event, ui) {
$.ajax({
type: 'POST',
url: "custom/php/showinfo.php",
success: function(data){
$("#new").html(data)
},
error: function(){ //on error
console.log('failed to successifuly destroy');
}
});
}
});
$(":mobile-pagecontainer").pagecontainer("change", "#schoolperformance", {
reload: true,
showLoadMsg: false
});
方法中的函数,则无法传递ajax,请尝试使用change event:
java -classpath YourProjectWar.jar com.yourpackage.ClassWithMain -f examples1.txt