Attributes of input in PHP

小云云
Release: 2023-03-19 17:02:01
Original
10999 people have browsed it

This article mainly introduces the hidden, read-only and restricted attributes of input. By changing the attributes of input, the input box can be limited in length and cannot be modified. Friends in need can refer to it. I hope it can help everyone.

Hide

Readonly

Invalid

< ;input type="text" disabled>

Limitations

##

ENTER key moves the cursor to the next input box


Copy after login

Shield input method


Copy after login

There are two ways to achieve the read-only effect of input:

disabledandreadonly.

Of course the two effects can only be read but not edited, but they are very different.

Disabled indicates that the input is invalid and its value will not be passed to any program, such as asp, PHP, etc.

Readonly only cannot be edited and does not affect the transfer of its value.

Disabled use:



 Readonly使用: 
Copy after login

Related recommendations:


Detailed explanation of WeChat applet input input examples

Tutorial on how to encapsulate input components in Vue

php://input input stream detailed explanation


The above is the detailed content of Attributes of input in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!