我正在尝试拆分以下网址:
http://www.store.com/products.aspx/Books/The-happy-donkey
为了只得到http://www.store.com/products.aspx
我正在使用 JavaScriptwindow.location.href
and split
但到目前为止还没有成功。
如何才能做到这一点?谢谢!
Try this
var fullurl = "http://www.store.com/products.aspx/Books/The-happy-donkey",
url = fullurl.split(".aspx")[0] + ".aspx";
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)