I need to the anchor out of a window.location
in JavaScript, such as the following url:
http://www.example.com/page.html#anchor1
What's the easiest method?
这应该是你想要的:
window.location.hash
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.