Occasionally, I need to group select contents. In the past, I used program control. Today, I found that there is an optgroup attribute in select that can be used. It has been tested and is suitable for browsers such as Firefox and IE. The only shortcoming found so far is that the title style after the group cannot be customized. For example: if you want to change the font properties, you can't use the normal font, but you can change the color and size. In IE, the default is italic and bold ![]() Copy code The code is as follows:<select name="bid" id="brand_3"> <option value="">Please select a brand</option> <optgroup label="A"></optgroup> <option value="693" custom="693">A AC BMW</option> <option value="62" custom="62">A Aston Martin</option> <option value="1" custom="1">A Audi</option> <optgroup label="B"></optgroup> <option value="723" custom="723">B Babos</option> <option value="44" custom="44">B Porsche</option> <option value="582" custom="582">B Baojun</option> <option value="20" custom="20">B BMW</option> <option value="593" custom="593">B Beijing Auto</option> <option value="643" custom="643">B BAIC Weiwang</option> <option value="122" custom="122">B BAIC Manufacturing</option> <option value="4" custom="4">B Mercedes-Benz</option> </select> |
<<: Vue+openlayer5 method to get the coordinates of the current mouse slide
>>: CSS achieves the effect of changing the color of the entire line when the mouse is placed on it
I was watching Tik Tok some time ago and thought ...
I will use three days to complete the static page...
1. Enable Prometheus telemetry data By default, t...
Preface This article mainly introduces the use an...
Table of contents 1. mixin.scss 2. Single file us...
During the crawler development process, you must ...
This article records the installation and configu...
Preface MySQL is a relational database with stron...
1.core file When a Segmentation fault (core dumpe...
Note: nginx installed via brew Website root direc...
You may already know that the length 1 of int(1) ...
Table of contents 1. Scenario 2. Solution 3. Conc...
Preface This article mainly introduces the releva...
Table of contents 1. Parameters that determine ca...
constraint Constraints ensure data integrity and ...