PHP
·
发表于 5年以前
·
阅读量:8290
function removeUrlPrefix(a) {
a = a
.replace(/:/g, ":")
.replace(/./g, ".")
.replace(///g, "/");
while (
trim(a)
.toLowerCase()
.indexOf("http://") == 0
) {
a = trim(a.replace(/http:\/\//i, ""));
}
return a;
}