+
95
-

js和jquery如何实现input text键盘回车事件监测?

js和jquery如何实现input text键盘回车事件监测?

网友回复

+
15
-

首先jquery方式

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
    <title>BFW NEW PAGE</title>
    <script  type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery.17.js"></script>
    <script type="text/javascript">
        $(function() {
          $(".input-cname").keypress(function (e) {
                if (e.which ==...

点击查看剩余70%

我知道答案,我要回答