[{"data":1,"prerenderedAt":43},["ShallowReactive",2],{"blog-post-2010-01-06-ctrl-enter-comment":3},{"id":4,"title":5,"body":6,"categories":28,"date":30,"description":12,"extension":31,"meta":32,"navigation":33,"path":34,"seo":35,"stem":36,"summary":37,"tags":38,"__hash__":42},"blog\u002Fblog\u002Fctrl-enter-comment.md","为你的评论框增加Ctrl+Enter提交功能",{"type":7,"value":8,"toc":25},"minimark",[9,13,16],[10,11,12],"p",{},"写完评论之后不能按Ctrl+回车提交，非要拿鼠标点一下，实在是痛苦的事情，不知道打消了多少懒人留言的积极性。 想给你的评论框添加这个功能么，那么就开始吧： 打开主题中comments.php文件，按Ctrl+F搜索“textarea”，然后在他的后面加上以下代码：",[10,14,15],{},"onkeydown=\"if(event.ctrlKey&&event.keyCode==13)\n{document.getElementById('submit').click();return false};\"",[10,17,18,19,24],{},"大概改完以后就是这么个样子： ",[20,21],"img",{"alt":22,"src":23},"","http:\u002F\u002Fi824.photobucket.com\u002Falbums\u002Fzz165\u002Finterjc\u002Fblogging\u002F2010-1-71-05-54.png"," 保存提交，然后就有这个功能了，经我自己测试了，基本上市面上的浏览器都可以很好的支持，爽吗？ Have fun !",{"title":22,"searchDepth":26,"depth":26,"links":27},2,[],[29],"Web","2010-01-07T01:07:45+08:00","md",{},true,"\u002Fblog\u002Fctrl-enter-comment",{"title":5,"description":12},"blog\u002Fctrl-enter-comment","写完评论之后不能按Ctrl+回车提交，非要拿鼠标点一下，实在是痛苦的事情，不知道打消了多少懒人留言的积极性。 想给你的评论框添加这个功能么，那么就开始吧： 打开主题中comments.php文件，按Ctrl+F搜索“textarea”，然后…",[39,40,41],"code","dev","js","mYiDg0E7M9IUUSwssHjZRZSeVzPNxOBm_QfMpObfjQw",1795177971206]