have pages A And B in page AI have the link that takes you to page B but I want it to take you to a specific Div in that page B can please someone help HTML
<td><button type="button" class="btn bg-blue-grey" onclick="more()">More</button></td>
JS
function more() {
window.location.href = "http://localhost:62114/Occupant/wiz#step2";
}
Give the div on page B an ID, and then put that ID after a #
in the link, eg:
<a href="page#my-div">
and
<div id="my-div"></div>
No need for Javascript
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.