Javascript 在url中查找hashtag并使用php附加到该url中的最后一个
我需要一个解决方案,在url中找到标签,并使用php附加到该url中的最后一个 旧URL:Javascript 在url中查找hashtag并使用php附加到该url中的最后一个,javascript,jquery,url,Javascript,Jquery,Url,我需要一个解决方案,在url中找到标签,并使用php附加到该url中的最后一个 旧URL: <a href="http://www.example.com#anchor1?name=shreyas&city=surat">My Url</a> 新网址: <a href="http://www.example.com#anchor1?name=shreyas&city=surat">My Url</a> 您也可以试试这个 HTML
<a href="http://www.example.com#anchor1?name=shreyas&city=surat">My Url</a>
新网址:
<a href="http://www.example.com#anchor1?name=shreyas&city=surat">My Url</a>
您也可以试试这个
HTML:
<a href="http://www.example.com#anchor1?name=shreyas&city=surat">My Url</a>
window.location.search=window.location.search+window.location.hash
@adeneowindow.location.hash
也将包含查询字符串。