+
拼音
+
+
@@ -21,8 +22,8 @@
生日
const { pinyin } = pinyinPro;
const elTextareaSrc = document.getElementById('idSrc');
const elTextareaDst = document.getElementById('idDst');
- elTextareaSrc.addEventListener('input', (event)=>{
- elTextareaDst.textContent = pinyin(elTextareaSrc.textContent);
+ elTextareaSrc.addEventListener('change', (event)=>{
+ elTextareaDst.value = pinyin(elTextareaSrc.value);
})