Home > Article > Web Front-end > How to click the button to jump to the page in html
htmlHow to click a button to jump to the page: 1. Nest an a tag outside the button tag and use a hyperlink to jump; 2. Add "onclick="window.location.href" to the button tag ='page url'"" code, use onclick event to jump.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
Method 1: Coat an a label with the button label
<a href="https://www.php.cn/"> <button>进入PHP中文网</button> </a>
Rendering:
##Method 2: Use onclick event
<button onclick="window.location.href = 'https://www.php.cn/'">进入PHP中文网</button>Rendering:
html video tutorial 》
The above is the detailed content of How to click the button to jump to the page in html. For more information, please follow other related articles on the PHP Chinese website!