How to click the button to jump to the page in html

青灯夜游
Release: 2023-01-06 11:13:20
Original
82618 people have browsed it

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.

How to click the button to jump to the page in html

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="//m.sbmmt.com/">
	<button>进入PHP中文网</button>
</a>
Copy after login

Rendering:

How to click the button to jump to the page in html

##Method 2: Use onclick event

<button onclick="window.location.href = &#39;//m.sbmmt.com/&#39;">进入PHP中文网</button>
Copy after login
Rendering:


How to click the button to jump to the page in html

Recommended tutorial: "

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!