How to set readonly in css/html

醉折花枝作酒筹
Release: 2023-01-05 16:08:35
Original
2953 people have browsed it

In css/html, it can be set by using the readonly attribute inside the input or textarea tag, such as "". The readonly attribute is used to specify that the input field is read-only, which prevents users from modifying the value.

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

<html>
<body>
<form action="/example/html/form_action.asp" method="get">
  <p>姓名:<input type="text" name="email" /></p>
  <p>国家:<input type="text" name="country" 
  value="China" readonly="readonly" /></p>
  <input type="submit" value="Submit" />
</form>
<p>请在提交按钮上单击,输入会发送到服务器上名为 "form_action.asp" 的页面。</p>
</body>
</html>
Copy after login

Running results:

How to set readonly in css/html

Recommended learning: css video tutorial

The above is the detailed content of How to set readonly in css/html. 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
Popular Tutorials
More>
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!