html: 

 <input type="text" id="expertIdt" name="expertIdt" maxlength="11" class="form-control  acvs-v-notnull" onchange="setRuleContent1()" />
 <select multiple="multiple" id="expertId" name="expertId" maxlength="11" class="form-control  acvs-v-notnull" onchange="setRuleContent()"></select>

input获得select的内容并显示在输入框中(可以选中单个值)

js:

$('#expertId option').on('click', function() {
                document.getElementById('expertIdt').value=  
                document.getElementById('expertId').options[document.getElementById('expertId').selectedIndex].value;

})

input获得select的内容并显示在输入框中(可以选中单个值)

效果:

input获得select的内容并显示在输入框中(可以选中单个值)


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
猜你喜欢
  • 2021-11-21
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案