Function to simulate PHP $_GET in javascript

/ Published in: JavaScript
Save to your folder(s)

Simulate the $_GET array from php in javascript to get url parameters this way:
url= http://localhost/?var1=example
$_GET['var1'] will return "example"

Just copy and paste the code.

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.