How to jQuery Get QueryString Value | Get QueryString Parameter Values in jQuery?

jQuery Get QueryString Value | Get QueryString Parameter Values in jQuery .

Use jQuery Get QueryString Value | Get QueryString Parameter Values in jQuery .

Follow below solution:

Now I explain how to get query string parameter values using jQuery in asp.net?

I explain how to get query string parameter values using
jQuery or get query string variable values using jQuery in asp.net is like below.

Implement below code in youer page.



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery & javascript through Get Current Page Url Parameter values</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function () {
var u_name = getValues('username');
var id = getValues('userid');
$('#spn_UserName').html('<strong>' + u_name + '</strong>');
$('#spn_UserId').html('<strong>' + id + '</strong>');
});
function getValues(param) {
var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < url.length; i++) {
var urlparam = url[i].split('=');
if (urlparam[0] == param) {
return urlparam[1];
}
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>UserName: <span id="spn_UserName"></span></p>
<p>UserId: <span id="spn_UserId"></span></p>
</div>
</form>
</body>
</html>

For more deatil Click here.

javascript – How can I get query string values?,javascript – jquery get querystring from URL
how can I get two parameters values from Query string using jquery,
Get Querystring With jQuery.

About the Author

avatar