SoFunction
Updated on 2025-04-14

Beginner's prototype, send a code that accepts URL parameters by JS


<script>
function request(key)
{
if(typeof(this)=="undefined")return false;
if(>0) 

var s = ("&"); 
for(var i in s) 

var sp=s[i].split("=")
if(sp[0]==key)return(sp[1]);

return false;

else return false
}
function getAllKey()
{
if(typeof(this)=="undefined")return false;
var arr=new Array;
if(>0) 

var s = ("&"); 
for(var i in s) 

var sp=s[i].split("=");
(sp[0]);

return arr;

else return false
}
=request
=getAllKey
//===================================================
var url=(1) //action=reply&forum=3&topic=1469
var arg=()
alert(arg)
("Submit Parameters:"+arg)
for(var cou in arg )
(The value of the parameter "+arg[cou]+" is: "+(arg[cou])+"<br>")
</script>