【发布时间】:2014-04-27 00:46:45
【问题描述】:
[编辑] 我有以下链接:
<a href="" class="undo_feedback">Undo</a>
我在单击链接时执行 ajax 请求:
$('table').on('click', '.undo_feedback', function(e){
// some code here
$.ajax({
type: "POST",
data: {'_method': 'delete'},
url: //some url
});
e.preventDefault();
});
它给出了错误cannot GET '//some url'。 POST 请求执行成功。我怎样才能摆脱这个错误?
我尝试过使用return false、e.stopPropagation() 和e.stopImmediatePropagation(),但它们似乎都不起作用。任何帮助将非常感激。在此先感谢:)
【问题讨论】:
-
在
// some code here上方放置一个alert("test");以检查函数是否被调用。是吗?
标签: javascript jquery ajax html node.js