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

c# - Reactive Extensions ControlScheduler -

multithreading - Reorderings in java memory model -

java - Add color code support to a Bukkit plugin -