Discuss / JavaScript / 中间ready初始化部分代码有问题

中间ready初始化部分代码有问题

Topic source
<html>
<head>
    <script>
        $(document).on('ready', function () {
            $('#testForm).on('submit', function () {
                alert('submit!');
            });
        });
    </script>
</head>
<body>
    <form id="testForm">
        ...
    </form>
</body>

#testForm缺少了一个引号

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

👍


  • 1

Reply