A
A
Alexander2021-02-13 20:14:49
Google Chrome
Alexander, 2021-02-13 20:14:49

Drop-down list. How to show in chrome by default the selected element with the disabled property, like in safari?

If we take an ordinary list like

<select name="select">
        <option disabled>Выбрать что-нибудь...</option>
        <option value="el1">Элемент 1</option>
        <option value="el2">Элемент 2</option>
        <option value="el3">Элемент 3</option>
    </select>

Then, opening the page with it in chrome, the “Element 1” item is immediately selected.
And if you open it in safari, the first, inactive element “Select something ...” is shown.
How would you organize the same behavior in chrome?
602808a9b65e1664067828.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Simkav, 2021-02-13
@gdX

<option selected value="el1">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question