serialize an object to create query URL string - Javascript jQuery

Javascript examples for jQuery:String

Description

serialize an object to create query URL string

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> 
      <script type="text/javascript">
    $(function(){/*from   ww  w.  j a v  a  2 s  .  c  o  m*/
console.log( $.param({id: 1, name: "Some name", color: '#444444' }) )
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials