如何实现,有多个输入框,要求第一个输入框输入汉字后,第二个输入框自动填充对应的大写拼音
4条回答 默认 最新
WEBYANGxw 2022-12-30 17:14关注```javascript vue的话: <input v-model="value" /> <input :value="value.toUpperCase()" /> 原生的话: <input id="input1"/> <input id="input2" /> document.getElementById('input1').on('input',(e)=>{ document.getElementById('input2').value = e.tage.value.toUpperCase() }) react 逻辑和vue差不多 就不写了..```
本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用