Error: invalid regular expression flag b Source File: http://localhost/media/javascript/global.js Line: 4, Column: 19 Source Code: url: /home/blog,
$("#blog").click(function () {
var url = $(this).attr("href");
$.ajax ({
url: /home/blog,
type: "POST",
success : function (html) {
$("#someDiv").append(html);
}
});
});
我无法弄清楚错误是什么,我的 URL 是否需要位于字符串中?我错过了什么?
最佳答案
您希望网址为“home/blog”
关于JavaScript 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1865865/