提交 174f74c0 编写于 作者: G gongfuxiang

自定义页面支持control+s保存

上级 28d7a9d5
......@@ -17,4 +17,18 @@ $(function()
$form.attr('request-type', 'ajax-fun');
$form.find('button[type="submit"]').trigger('click');
});
// control+s保存
$(window).on('keydown', function(event)
{
if(event.ctrlKey || event.metaKey)
{
var key = String.fromCharCode(event.which).toLowerCase();
if(key == 's')
{
$('.page-save-submit').trigger('click');
event.preventDefault();
}
}
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册