将此更改为...
www.sample.com/sample.html#commentxxx?stuffhereIdontneed
转换成这样...
www.sample.com/sample.html
我把它放在一个链接中,所以我认为我需要一个正则表达式?
document.write("<a href='"+ window.location.href.replace('?????', '') +
"?ThisIsAppendedLater'>sample</a>");