How to add hyperlink to button in css

藏色散人
Release: 2023-01-04 09:38:35
Original
7579 people have browsed it

How to add a hyperlink to a button using css: 1. Use the "window.location.href('url address')" method to redirect this page to a new page; 2. Use "window.open(' url')" method to open a new page.

How to add hyperlink to button in css

The operating environment of this tutorial: windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Related recommendations: "css video tutorial"

html/css Add hyperlink to button

You can use HTML onclick event attribute

1. If you want this page to redirect to a new page, use:

<input type="button" onclick="window.location.href(&#39;url地址&#39;)">
Copy after login

Related labels:
css
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