0
jQuery的Ajax請求jQuery的Ajax請求的錯誤
<script>
function onSubModulesSelect(id, checkbox) {
alert(id)
if (checkbox.checked) {
$.ajax({
type : 'POST',
url : 'selectedSubModulesRow.html',
data : ({
checkBoxId : id
})
});
}
}
</script>\\\
控制器
@RequestMapping(value =Array("/selectedSubModulesRow.html"))
@ResponseBody
def selectedSubModuleRow(@RequestParam checkBoxId: String) {
println("Reached..!")
if (checkBoxId != null) {
println(checkBoxId)
}
}
當我按下提交按鈕它不能解析到控制器的方法...瀏覽器控制檯顯示一些錯誤
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/resources/demos/style.css
GET http://localhost:8080/learnware/teacher/selectedSubModulesRow.html?checkBoxId=q1 500 (Internal Server Error) jquery-1.9.1.js:8526
是否還有其他問題? –
@jijeshAj我真的認爲你需要添加資源配置,如果你還沒有它。 –
thnx凱文,但我怎麼可以添加.. –