Sun Sep 18, 2011 12:54 am
<html>
<title>Get url parameter</title>
<head>
<script language="JavaScript">
// return paramter value by name for paramters sent by url.
function getValueByName(paraName)
{
// get parameter string partion from url.
var urlString = window.location.search.substring(1);
var parameters = urlString.split("&");
for (var i=0;i<parameters.length;i++)
{
var param = parameters[i].split("=");
// return url parameter value
if(param[0] == paraName){return param[1];}
}
return(false);
}
</script>
</head>
<body>
<script language="JavaScript">
// document.write(getValueByName('student'));
</script>
</body>
</HTML>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.