How to append two data in url that has to be passed in jquery -


I am trying to add two IDs in the url but this code is saying 0

 < Code> var url = 'post_comment.php? Userid = '+ $ ('. Post_comment '). Data ('User Id') & amp; 'Postid =' + postid;  

When I try

  var url = 'post_comment.php? Userid = '+ $ ('. Post_comment '). Data ('userid');  

This works

try it out ....

  var url = 'post_comment.php? Userid = '+ $ ('. Post_comment '). Data ('userID') and postid = '+ postid;  

The variable uses the "+" operator to join two strings or strings with Javascript.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -