Files
webrtc/client/request.js
2016-02-09 19:08:07 +09:00

31 lines
700 B
JavaScript

var Request = function()
{
this.getParameter = function( name )
{
var rtnval = '';
var nowAddress = unescape(location.href);
var parameters = (nowAddress.slice(nowAddress.indexOf('?')+1,nowAddress.length)).split('&');
for(var i = 0 ; i < parameters.length ; i++)
{
var varName = parameters[i].split('=')[0];
if(varName.toUpperCase() == name.toUpperCase())
{
rtnval = parameters[i].split('=')[1];
break;
}
}
return rtnval;
// document.write( rtnval );
}
}
function trace() {
msg = '['+(new Date().toLocaleString())+'] ';
var newArgs = arguments;
newArgs[0] = msg + newArgs[0]
console.log(arguments.length + ', ' + newArgs.length);
console.log(newArgs);
}