Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 Obtain JS Requested Query String

View previous topic View next topic Go down 
AuthorMessage
Tomorrow
Member
Member
Tomorrow

Posts : 1
Join date : 2011-05-14

Obtain JS Requested Query String Empty
PostSubject: Obtain JS Requested Query String   Obtain JS Requested Query String EmptySat May 14, 2011 7:33 pm

Hey I need help to obtain the requested javascript's query string.

Example:
Code:

script type="text/javascript" src="script.js?v=123"></script>

How can I use that query string inside script.js for example like
Code:

var v = 'The code to get the query fragment';
alert(v); // alerts '123'

Thank you.
Back to top Go down
Knowledge
Member
Member
Knowledge

Posts : 21
Join date : 2011-03-09

Obtain JS Requested Query String Empty
PostSubject: Re: Obtain JS Requested Query String   Obtain JS Requested Query String EmptySat May 14, 2011 7:34 pm

http://www.javascriptkit.com/jsref/location.shtml

if you have many parametres separated by & you can use split to get a array

best regards
Back to top Go down
 

Obtain JS Requested Query String

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Problems with Group By Query
» Convert string to date
» How to remove part of string?
» Add a custom string property to a linklabel?Dear all I am totally new to visual C#. Whilst I can sort of manage console apps, I easily get lost when it comes to coding forms. I am currently making an "app launcher" which reads a text file line by line.

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: Obtain JS Requested Query String Edit-trash Useless :: Trash-