js-监听input 输入中文 Posted on 2018-12-08 15:55 1234567891011121314var cpLock = false;$('#jd-temp-name').on('compositionstart', function () { cpLock = true; });$('#jd-temp-name').on('compositionend', function () { cpLock = false;});$('#jd-temp-name').on('input', function() { if (!cpLock) { setTimeout(function () { $('#jd-temp-search-form').submit() }, 1) } })