20151117 minor issues, 20151117 Problems
1. API
Baidu Encyclopedia: application programming interface (API) is a number of predefined functions, objective To provide applications and developers with the ability to access a group of routines based on a software or hardware without accessing source code or understanding the details of internal working mechanisms.
In addition to the meaning of "application interface", APIS also refer to API instructions, also known as help documentation.
The API help documentation is a document written to these functions to help developers understand how to use functions. in JAVA, the API help document is embodied in the javadoc document, which allows you to conveniently check the interface description and class description, this helps users who want to use your interfaces understand your interfaces and your interface features.
2. button usage (compared with input)
Definition and usage:
<Button> the tag defines a button.
Content can be placed inside the button element, such as text or images. This is the difference between the button created by buttion and input.
<Button> buttons provide more powerful functions and richer content than <input type = "button">. all content between the <button> and </button> labels is the content of the button, including any acceptable body content, such as text or multimedia content. for example, you can include an image and related text in a button and use them to create an attractive labeled image in the button.
The only prohibited element is image ing because its mouse-and keyboard-sensitive actions interfere with form buttons.
Always specify the type attribute for the button. The default type of Internet Explorer is "button", and the default value of other browsers (including W3C specifications) is "submit ".
Browser support:
All mainstream browsers support <button> labels
Important: If the button element is used in an HTML form, different browsers submit different values. internet Explorer submits the text between <buttton> and </button>, while other browser shouts submit the content of the value attribute. use the input element in the HTML form to create a button.
Optional attributes:
Attribute |
Value |
Description |
Name |
Name |
Name of the specified button |
Type |
Button Reset Submit |
Specifies the button type |
Value |
Text |
Initial Value of the specified button |
Standard attributes: id, class, title, style, dir, lang, xml: lang, accesskey, tabindex
Event attributes: onfocus, onblur, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
Note:
When using the <button> tag, it is easy to take it for granted as <input type = "button">. This can easily produce the following errors:
1. Get it through $ ('# mbmbtn'). val ()
<Button id = "customBtn" value = "test"> button </button>
In IE (IE kernel), the value is "button" instead of "test". Instead of "test", the value obtained in IE is "test ".
2. accidentally put the <button> label in the <form> label. You will find that clicking this button becomes a submission, which is equivalent to <input type = "submit"/>
Do not treat the <button> label as an input element in <form>.