A brief discussion on read-only and disabled attributes in forms

A brief discussion on read-only and disabled attributes in forms

Read-only and disabled attributes in forms

1. Read-only: The server does not want users to modify the data, but only requires the data to be displayed in the form. For example, registration or transaction agreements, product prices, etc.

2. Disable: A function can only be used after a certain condition is met. For example, users are allowed to click the "Register" button only after they agree to the registration agreement. The player space can no longer click the "Play" button when it is in playback state.

Read-only Implemented through the readonly attribute
Disable Implemented through the disabled attribute

For example

<textarea name=”text” rows=”10” cols=”30” readonly=”readonly”><!—This document attribute is read-only-->

(Specific content of the service agreement)…</textarea>

<input type=”submit” value=”Register” disabled=”disabled“/><!—This button is disabled-->

Extension: <input type=”submit” name=”button” value=”Agree to the terms of service, submit registration button” disabled=”true”/>

The above brief discussion on the read-only and disabled attributes in the form is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

<<:  Conditional comments to determine the browser (IE series)

>>:  Let's talk about the LIMIT statement in MySQL in detail

Recommend

The difference between this.$router and this.$route in Vue and the push() method

The official document states: By injecting the ro...

MySql development of automatic synchronization table structure

Development Pain Points During the development pr...

Use Nginx to build a streaming media server to realize live broadcast function

Written in front In recent years, the live stream...

RGBA alpha transparency conversion calculation table

Conversion between rgba and filter values ​​under...

Implementation of breakpoint resume in vue-video-player

In a recent project, I needed to implement the fu...

Teach you the detailed process of installing DOClever with Docker Compose

Table of contents 1. What is Docker Compose and h...

Sharing of SVN service backup operation steps

SVN service backup steps 1. Prepare the source se...

What to do if you forget your Linux/Mac MySQL password

What to do if you forget your Linux/Mac MySQL pas...

Vue implements book management case

This article example shares the specific code of ...

Alibaba Cloud Server Linux System Builds Tomcat to Deploy Web Project

I divide the whole process into four steps: Downl...

HTML text escape tips

Today I saw a little trick for HTML text escaping ...

How to install mysql5.7 in windows

First download the compressed version of mysql, t...

Usage of Vue filters and timestamp conversion issues

Table of contents 1. Quickly recognize the concep...

js to write the carousel effect

This article shares the specific code of js to ac...

Vue realizes adding watermark to uploaded pictures (upgraded version)

The vue project implements an upgraded version of...