网页中经常会有提交表单,按回车执行登录或者注册,比较方便
HTML:
<input class=”btn_l” type=”image” alt=”登录” src=”img/login.gif” onclick=”login();” onKeyDown=”ctlent()”>
JS:
function ctlent(eventobject){
if((event.ctrlKey&&window.event.keyCode==13)||window.event.keyCode==13)
{login();return false;}
else{return true;}}
</script>
最新评论
写的挺好的
有没有兴趣翻译 impatient js? https://exploringjs.com/impatient-js/index.html
Flexbox playground is so great!
感谢总结。
awesome!
这个好像很早就看到类似的文章了
比其他的教程好太多了
柯理化讲的好模糊…没懂