Home  >  Article  >  Web Front-end  >  5 application methods of HTML text box

5 application methods of HTML text box

巴扎黑
巴扎黑Original
2017-06-02 10:46:122953browse

A simple text box actually has many functional attributes. Let’s summarize some of the attributes and usages we often use:

1.Restrict html text box The method of inputting only numbers and decimal points

This article mainly introduces the method of restricting the input of HTML text box to only input numbers and decimal points. Has very good reference value. Let's take a look at it with the editor

5 application methods of HTML text box

2.Share multiple implementation methods of html text box text being unavailable and read-only

Sometimes, we hope that the text box in the form is read-only so that users cannot modify the information. This article has compiled a variety of implementation methods. Interested friends can refer to method one below: Not available
Method 2: Read only

5 application methods of HTML text box

##3.

Detailed explanation of controlling the vertical centering of text in HTML text boxes through css

When the height attribute of Text is defined, the text entered in Text is not vertically centered, but It can be controlled through CSS. There is a good example below. You can refer to it. When the height attribute of Text is defined, the text entered in Text is not vertically centered. However, you can add CSS to control it so that the input The text is vertically centered to make the webpage more perfect.

5 application methods of HTML text box

4.

html text box code PHP method of converting text box content into HTML format

The example in this article describes PHP converting text The method of formatting the box content into HTML. Share it with everyone for your reference, the details are as follows:

Sometimes we will use the content entered in the multi-line text box to be displayed in html format, so that the original text format can be maintained, such as line breaks, Enter and wait. This can be achieved through the following function:

5.

How to implement the html text box input link to the real-time image display

How to implement the html text box input link to the real-time image display

1. Enter the number in the text box
2. Link to the corresponding picture and display it in the new page

The above is the detailed content of 5 application methods of HTML text box. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn