728x90
<SCRIPT Language="JavaScript">
<!--
/*
* This function parses comma separated name=value 
* argument pairs from the query string of the URL. 
* It stores the name=value pairs in 
* properties of an object and then returns that object
* 
* Jim K - From Orielly JSB pp 244
*/

function getArgs() {
	var args = new Object();
	// Get Query String
	var query = location.search.substring(1); 
	// Split query at the comma
	var pairs = query.split("&"); 
	
	// Begin loop through the querystring
	for(var i = 0; i < pairs.length; i++) {

		// Look for "name=value"
		var pos = pairs[i].indexOf('='); 
		// if not found, skip to next
		if (pos == -1) continue; 
		// Extract the name
		var argname = pairs[i].substring(0,pos); 
		
		// Extract the value
		var value = pairs[i].substring(pos+1); 
		// Store as a property
		args[argname] = unescape(value); 
	}
	return args; // Return the Object
}

// Set Defaults
var StyleSheet = "StyleSheet"
var OuterTableWidth = "640"

// Get the values back
var args = getArgs(); //Get the arguments
if (args.CSSPATH) StyleSheet = (args.CSSPATH);
if (args.OTBL) OuterTableWidth = (args.OTBL);
// write the path for the style sheet now
document.write("<link rel='stylesheet' 
href='http://www.jamesrking.com/_scriptLib/Includes/StyleSheet" 
+ args.CSSPATH + ".css'>");

//-->
</SCRIPT>
728x90

'Information' 카테고리의 다른 글

CSS Cuser Property  (0) 2007.03.03
web editor 소스  (0) 2007.03.03
개발자 등급 기준 -출처 Codeway-  (0) 2007.03.03

+ Recent posts