标签:function keycode UNC document fun 回车提交 vue let 监听
created: function() { var _this = this; document.onkeydown = function(e) { //按下回车提交 let key = window.event.keyCode; //事件中keycode=13为回车事件 if (key == 13) { _this.append(); } }; },
append: function() { alert("我是回车"); },
标签:function keycode UNC document fun 回车提交 vue let 监听
原文地址:https://www.cnblogs.com/u-damowang1/p/12158394.html