HOME / BLOG / BLOG-POST

How to get id (any parameter) from url using jquery?

Get id (any parameter) from url using jquery?

 

jQuery(document).ready(function(){
var query = window.location.search.substring(1); 
var vars = query.split("="); 
var ID= vars[1]; alert(ID); 
});

 


about authors

Sandip Das

Web Developer

Once a legend said “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” – Martin Fowler.



POST COMMENTS

Leave a Reply

Your email address will not be published. Required fields are marked *