• 0
Manoodin

Selecionar Menu para Outro Selecionar Menu

Question

como selecionar um menu para um outro menu oculto com display: none;?

<select id="help-comradeso[]" > 

<option value="1">Janeiro</option>

<option value="2">Fevereiro</option>

<option value="3">Março</option> 

<option value="4">Abril</option> 

<option value="5">Maio</option>

<option value="6">Junho</option>

<option value="7">Julho</option>

<option value="8">Agosto</option>

<option value="1912">Setembro</option>

<option value="10">Outubro</option> 

<option value="11">Novembro</option>

<option value="12">Dezembro</option>



</select> <select id="help-comradeso[]" style="display:none"> 

<option value="1">Janeiro</option> 

<option value="2">Fevereiro</option>

<option value="3">Março</option>

<option value="4">Abril</option>

<option value="5">Maio</option> 

<option value="6">Junho</option> 

<option value="7">Julho</option> 

<option value="8">Agosto</option>

<option value="1912">Setembro</option> 

<option value="10">Outubro</option>

<option value="11">Novembro</option> 

<option value="12">Dezembro</option>

</select>

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Usando jQuery...

<select id="help-comradeso">
    <option value="1">Janeiro</option>
    <option value="2">Fevereiro</option>
    <option value="3">Março</option>
    <option value="4">Abril</option>
    <option value="5">Maio</option>
    <option value="6">Junho</option>
    <option value="7">Julho</option>
    <option value="8">Agosto</option>
    <option value="9">Setembro</option>
    <option value="10">Outubro</option>
    <option value="11">Novembro</option>
    <option value="12">Dezembro</option>
</select>
<select id="help-comradeso-2" style="display:none">
    <option value="1">Janeiro</option>
    <option value="2">Fevereiro</option>
    <option value="3">Março</option>
    <option value="4">Abril</option>
    <option value="5">Maio</option>
    <option value="6">Junho</option>
    <option value="7">Julho</option>
    <option value="8">Agosto</option>
    <option value="9">Setembro</option>
    <option value="10">Outubro</option>
    <option value="11">Novembro</option>
    <option value="12">Dezembro</option>
</select>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script>
    $(document).ready(function () {
        $('#help-comradeso').change(function (e) {
            $('#help-comradeso-2').val($('#help-comradeso').val());
        });
    });
</script>

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.