function keydownEnter(e) {
if(!e.shiftKey && e.keyCode===13){
e.cancelBubble = true; //ie阻止冒泡行为
e.stopPropagation();//Firefox阻止冒泡行为
e.preventDefault(); //取消事件的默认动作*换行
if(e.srcElement.value)
{
submit()
}
}
}
textarea 回车提交;shift+回车 换行
最新推荐文章于 2023-09-02 09:47:08 发布