Click me!]."/> Click me!].">
Home > Article > Web Front-end > How to set a button in html
htmlThe way to set a button is to add a pair of
The operating environment of this article: windows10 system, html 5, thinkpad t480 computer.
It is very simple to set a button in HTML, because HTML provides us with a
Inside the
Common attribute values:
name name specifies the name of the button.
type button\reset\submit Specifies the type of button.
#value text Specifies the initial value of the button. Can be modified by script.
Code example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body> <button type="button" onclick="alert('你好,世界!')">点我!</button> </body> </html>
The running effect is as shown in the figure:
Related video sharing: htmlvideo tutorial
The above is the detailed content of How to set a button in html. For more information, please follow other related articles on the PHP Chinese website!