Detailed description of the input tag in the applet and simple example, the input tag of the Applet
Detailed description of input tags in applets and simple examples
When using the input tag, we can use it in a small program. However, some common attributes cannot be used as expected:
I will use the most common examples:
One by one:
First, I defined his id, which is the most commonly used one, so I configured an id. After all, I did not operate on him. Why is it set to an input box? Second, set his style. Third, set his input category. The above is very simple. Fourth. Use the regular expression l. The input is limited to numbers only. This may be a bit hard to understand. This is a listener for his keyup event and will not be ignored for a list that is not a pure number. Note that it is for the whole, not for filtering by rows. Fifth, restrict his input to a maximum of 6 digits and listen to the sixth input event. This is exclusive. The seventh part of his event will be given below, setting his 'prompt s' when the input box is blank ';
Bindinput event:
Bind, as the name implies, is binding and binding input
The event is as follows:
Tapevent: function (e) {// if (e.tar get. id = "increase") {this. data. tickets ++; this. setData (this. data);} else {this. data. tickets --; this. setData (this. data);} // modify the total amount here },
This is an excerpt, so do not be curious about how to run this section. Tapevent is defined as a function. The operation is similar to that of Android. The page is refreshed.
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!