We all know that a button is defined in the web. The most common method is to use the type = 'click' of the input element '. However, in HTML spec 4.0, a button element is added, and ie4.0 has started to support <button>. As the name suggests, it is also used to define a webpage button, but it is very different from <input type = '...'>.
The biggest difference between a button element and an input element is that a button is a container type element that can contain valid HTMLCodeBy using the canhavechildren and canhavehtml Attributes provided by ie5.5, we can see that both attributes areTrue. The input element cannot contain child elements and HTML code. Its canhavechildren and canhavehtml attributes areFalse.
In this way, it is very easy to create a button with an image. For example:
< Button > < IMG Align = 'Abcddle' SRC = '/Emoticons/emnote.gif'>SingSong </Button >
Will be displayed:Sing Song.
Webpage buttons with mnemonic:
< Button Accesskey = "B" > <U> B</U>Otton </ Button >
BOttonOf course, this cannot be automatically executed. You can only use Alt + B to focus on it. You need to use JavaScript to control the response.
Button element with any HTML content:
|
Text |
|
|
|
|
|
Text |
|
Cnblogs |
Texttext textsdaf |
|
Text |
Cnblogs |
|
|
|
|
Texttext textsdaf |
Cnblogs |
|
|
|
|
Text |
|
Text |
|
|
Cnblogs |
Text |
|
|
|
|
|
|
Text |
|
|
|
Texttext textsdaf |
|
Text |
|
|
Texttext textsdaf asdfsdfsdf |
Cnblogs |
|
|
|
|
However, this complicated embedding problem also exists. Although it can be displayed, the embedded element event cannot be triggered.
However, the button ElementNoEmbedded button elements, such as the following example:
< Button >
Outer button
< Button >
Inner button
</ Button >
</ Button >
Will be displayed:Outer buttonInner button.