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.

javascript variable scope on so


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -