javascript - How to Pass Variable Into .post()? -
i have this...
$().ready(function () { $(".post .comment_this").click(function () { var comment_id = $(this).attr('rel'); $.post(url_base + 'bio/community/get_comments', { 'comment_id' : comment_id }, function (response) { console.log(comment_id); }); }); });
how pass comment_id
function? can use there...
you can use there without problem.
in javascript can access every variable defined in scope chain, global scope. locally defined variables override ones come chain.
Comments
Post a Comment