试了一下,这样可以 function keyDown (event) { if (event.shiftKey && event.keyCode === 13) { event.preventDefault(); document.execCommand('insertParagraph'); return false; } document.execCommand('formatblock', false, ''); } > 仅在 Chrome 120.0.6099.201 (Official Build) (64-bit) (cohort: Control) 中进行测试。