我从 jQuery 调用 Struts 2 操作,如下代码所示。
jQuery( "#dialog-form" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
buttons : {
"Search" : function() {
jQuery.ajax({
type : 'POST',
url : ' <s:submit action="part" method="find" /> '
})
}
}
});
有没有办法从jquery调用struts Action ?
最佳答案
使用
jQuery("#dialog-form").dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
buttons : {
"Search" : function() {
jQuery.ajax({type : 'POST',
url : '<s:url action="part" method="find"/>'
});
}
}
});
关于java - Jquery 错误 - 调用 Struts 2 操作时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17071499/