html option disable select select disable option example

html option disable select select disable option example

Copy code
The code is as follows:

<select>
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
<option value="">4</option>
<option value="">5</option>
</select>



I don't want users to be able to choose 345. What should I do?

Copy code
The code is as follows:

<select>
<option value="">1</option>
<option value="">2</option>
<optgroup label="3"></optgroup>
<optgroup label="4"></optgroup>
<optgroup label="5"></optgroup>
</select>



That's it.

<<:  MySQL configuration master-slave server (one master and multiple slaves)

>>:  Why is the scroll bar on the web page set on the right?

Recommend

How to configure mysql on ubuntu server and implement remote connection

Server: Ubuntu Server 16.04 LSS Client: Ubuntu 16...

Detailed explanation of React component communication

Table of contents Component Communication Introdu...

Vue realizes the whole process of slider drag verification function

Rendering Define the skeleton, write HTML and CSS...

CSS sample code with search navigation bar

This article shows you how to use CSS to create a...

ul list tag design web page multi-column layout

I suddenly thought of this method when I was writi...

3 ways to add links to HTML select tags

The first one : Copy code The code is as follows: ...

Detailed tutorial on installing JDK1.8 on Linux

1. Cleaning before installation rpm -qa | grep jd...

Nginx reverse proxy and load balancing practice

Reverse Proxy Reverse proxy refers to receiving t...

Some settings of Div about border and transparency

frame: Style=”border-style:solid;border-width:5px;...

HTML scroll bar textarea attribute setting

1. Overflow content overflow settings (set whether...

Detailed explanation of Deepin using docker to install mysql database

Query the MySQL source first docker search mysql ...

Solution to the welcome to emergency mode message when booting CentOS7.4

Today I used a virtual machine to do an experimen...

Solution to the ineffectiveness of flex layout width in css3

Two-column layout is often used in projects. Ther...

A brief discussion on the role of HTML empty links

Empty link: That is, there is no link with a targ...