hw4 - } var argname = pairs[i].substring( 0, pos ); // If...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
var args = new Object(); var query = location.search.substring(1); // Get query string var pairs = query.split( "," ); // Break at comma for ( var i = 0; i < pairs.length; i++ ) { var pos = pairs[i].indexOf('='); if( pos == -1 ) { continue; // Look for "name=value"
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } var argname = pairs[i].substring( 0, pos ); // If not found, skip var value = pairs[i].substring( pos + 1 ); // Extract the name args[argname] = unescape( value ); // Extract the value }...
View Full Document

This note was uploaded on 01/29/2012 for the course 220 103 taught by Professor Sheflin during the Fall '09 term at Rutgers.

Ask a homework question - tutors are online