0
我遇到这个错误,同时做一个Ajax请求,并在看后,如果我根本无法找到问题。这是下面的代码。SyntaxError:missing;之前与AJAX声明
$('#post_submit').click(function() {
var poster_id = <?php echo $session_user_id; ?>;
//firebug syntax error shows the line below is the problem
var profile_user_id: <?php echo $user_id; ?>;
var post = $('#post').val();
$.post('ajax_submit_post.php',
{
profile_user_id: profile_user_id,
poster_id: poster_id,
comment_type : comment_type,
post: post
},
function() {
$('#status').append('<li class="hide">Posted</li>').hide(1000);
});
});
是啊,我发现它的权利,当通知我,你一个答案回答。当它让我时,我会给你支票。 – jason328