🌈 搜索
📅 最后修改于: 2022-03-11 15:03:16.138000 🧑 作者: Mango
var field = document.querySelector('[name="username"]'); field.addEventListener('keypress', function ( event ) { var key = event.keyCode; if (key === 32) { event.preventDefault(); } });