Tag:input

  • The difference between name and value in the input tag

    Time:2021-10-15

    Type browser controls for access (for example, type = “text”, which is a text box; type = “button”, which is a button)The optional values of type are as follows:Button buttonCheckbox check button componentFile upload componentHidden hidden domainImage picture areaPassword password input text boxRadio button componentReset reset form buttonSubmit submit form buttonTexttext input box*********************************************************************** ID is […]

  • How to use input event to monitor the input of mobile terminal

    Time:2021-7-13

    Today, there is a new requirement. The manager requires the comment function to limit the number of words, just like microblog, which limits the maximum number of words to 150. Here we need to remind users how many words they can input in real time. At the beginning, I thought of listening to the Keyup […]

  • The method of making text box such as form input read-only and non editable in HTML

    Time:2021-5-6

    Sometimes, we want the text box in the form to be read-only, so that users can’t modify the information in it. For example, the word “China” can’t be modified for the content of < input type = “text” name = “input1” value = “China” >. There are several ways to achieve it. Method 1: onfocus […]

  • Input file custom button beautification (Demo)

    Time:2021-3-16

    I have written such an article before, but I used JS script. The advantage is that I can display the file path. If you don’t need to see the path, you can only display the custom button. There is another method. The following is just using the CSS technique. The key is to give font […]

  • The difference between button and input type = button

    Time:2021-3-10

    < button > label Definition and Usage The < button > tag defines a button.Inside the button element, you can place content, such as text or images. This is the difference between this element and the button created with the input element.The < button > control provides more powerful functions and richer contents than the […]

  • The difference between html4 and HTML5 is how to add focus implementation code to an input

    Time:2021-2-19

    html4: Copy code The code is as follows: <form> <p><label>Username:<input name=search type=”text”></label></p> <script type=”text/javascript”> document.getElementById (‘search’).focus() </script> </form> html5: Copy code The code is as follows: <form> <p> <label>Search:<input name=search autofocus></label> </p> </form>

  • Remove the white background and border of input box on HTML5 page of mobile terminal (compatible with Android and IOS)

    Time:2021-2-13

    Two days ago, in the HTML5 page developed on wechat, there was an order query to select the time. The input type = “date” > input box, which was just used, didn’t add any style. The effect was that the white background and the border were ugly, which was completely incompatible with the whole background. […]

  • The input text box is not allowed to enter implementation properties

    Time:2021-2-10

    Today, I would like to summarize several useful HTML tags, which are often used in development. Those who are not familiar with them may not be very clear Copy code The code is as follows: readonly、disabled、autocomplete Readonly means that the value of this field can’t be modified. It can only be used with type = […]

  • Using input type = text value = STR to value incomplete solution

    Time:2021-1-26

    Today, I encountered a very strange problem. Take a look at the following code:SimpleDateFormat dateFormat = new SimpleDa Copy code The code is as follows: Teformat (“yyyy MM DD e”);String date = dateFormat.format(new Date()); The original intention is to print out XX, XX, XX, XX, XX, XXThe problem lies in the following code. When I […]

  • What is the meaning of input type and how to limit input

    Time:2021-1-25

    Common methods of limiting input1. Cancel the dotted box when the button is pressed, and add the attribute value hidefocus or hidefocus = true in input Copy code The code is as follows: < input type = submit “value = submit” hideocus = true / > 2. Read only text box content, add attribute value […]

  • Example code of CSS pseudo class modifying input selected style

    Time:2021-1-20

    Note: this table is from w3school tutorial The classification and function of pseudo elements are as follows Let’s take a look at the example code of CSS pseudo class modifying the selected style of input. The code is as follows: Mainly used after pseudo class and font symbols. input{ -webkit-appearance: none; -moz-appearance: none; appearance: none; […]

  • Discussion on style customization and browser compatibility of input element

    Time:2021-1-17

    In the past two days, I encountered such a problem when I was doing the written examination of the people’s network. I realized an existing module of the people’s network with the new features of HTML5. After wandering in the people’s network for a while, I finally chose the form module for publishing information. The […]