bookmark_borderAccessing querystring value using JavaScript

When I was working with server-side script, I have the question its possible to access query-string values from JavaScript. But which way it will be identify the each parameters from the query-string.

In JavaScript we have method “window.location.href” which will read url and query-string. We will create two html file, first one will have text-box and submit, second html file will display query-string in webpage.


<form action="result.html" method="get">
<td><input type="text" name="txtName" /></td>
<td><input type="text" name="txtAge" /></td>
<td><input type="submit" name="btnSubmit" value="Submit" /></td>

Continue reading “Accessing querystring value using JavaScript”