Live Chat Icon For mobile
Live Chat Icon

Can I access the query string using JavaScript?

Platform: ASP.NET| Category: Client Side Scripting

A query string is an optional part of a URL that goes after the file name and begins with a questionmark.

For eg the query string will be as


Here querystringvalue is the newquerystringadded.

The query string can be added and it can be retrieved as shown,

	<input type=button value='AddQueryString'  
	<input type=button value='ShowQueryString' 
	onClick='alert(’Query string Value: ’'>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.