Regarding jquery select...

Asked 2 years ago, Updated 2 years ago, 41 views

<select class="category">
    <option>A</option>
    <option>B</option>
    <option>C</option>
</select>

<select class="group">
    <option>A1</option>
    <option>A2</option>
    <option>A3</option>
    <option>B1</option>
    <option>B2</option>
    <option>B3</option>
    <option>C1</option>
    <option>C2</option>
    <option>C3</option>
</select>

<div class="select-wrap">
    <a>X</a>
     <ol>
        <li>A</li>
        <li>B</li>
        <li>B1</li>
    </ol>
</div>

If A is selected by selecting [class = category], the selection value is entered in the select-wrap division part, and option A is erased from the category When selecting the option value related to B (B1, B2, B3) in select [class = group], the selection value is also entered in the select-wrap division part of +[class = category], and the entered value is deleted in the select part. Also, if you press the tag a, everything will be erased, so I'm going to reset it.

Masters, please give us hints.

jquery

2022-09-21 16:51

1 Answers

I'll give you a hint~

Select an element with selector to bind the event handler (a function to be executed when a selection event occurs) and modify the value of the element to


2022-09-21 16:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.