javascript

var br = "<br />";
//引数確認
var o = document.getElementsByTagName("script");
document.write(o);
document.write(br);
var s = o[o.length-1].src;
document.write(s);
document.write(br);
var d = o[o.length-1].src.substring(0, o[o.length-1].src.lastIndexOf("_userdata"));
document.write(d);
document.write(br);
if(s.match(/\?/i)){
var q = o[o.length-1].src.substring(o[o.length-1].src.lastIndexOf("?")+1);
document.write(q);
document.write(br);
var p = q.replace(/(^.*?)(c)=(.*?)(&.*?$|$)/,"$3");
document.write(p);
document.write(br);
function geturlqp(q,p){
return q.replace(RegExp("(^.*?)("+p+")=(.*?)(&.*?$|$)"),"$3");
}
document.write(geturlqp(q,"c"));
document.write(br);
document.write(geturlqp(q,"w"));
}