A QueryString collection for JavaScript(prettycode.org)

submitted by deverdever(350) 2 years, 9 months ago

Used to Request.QueryString? It doesn't exist in JavaScript. Here's a script to create it with no other script dependencies.

4 comments |category: |Views: 284

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by StevenBorStevenBor(0) 2 years, 9 months ago 0

Cool

Reply

posted by lysplysp(5) 2 years, 9 months ago 0

var oQS = new Object();
window.location.search.replace( new RegExp( "([^?=&]+)(=([^&]*))?", "g" ), function( $0, $1, $2, $3 ) { oQS[ $1 ] = $3; } );

alert(oQS['id']);

Even simpler method.

Reply

posted by lysplysp(5) 2 years, 9 months ago 0

new RegExp( "( [^?

(remove the space inbetween the brackets).

Reply

posted by lysplysp(5) 2 years, 9 months ago 0

3rd time lucky:

http://www.copypastecode.com/codes/view/5018

Reply

information Login or create an account to comment on this story