PageSourceSearch

https://grace-xhw.github.io/projects/chart/js/main.js

js grace-xhw.github.io collected 2026-10-03 09:15:29 UTC 1,857 bytes, 51 lines download raw bytes

1
2    $(document).ready(function () {
3     $("#demoForm").validate({
4            rules: {
5                username: {
6                    required: true,
7                    minlength: 2,
8                    maxlength: 10
9                },
10                password: {
11                    required: true,
12                    minlength: 2,
13                    maxlength: 16
14                },
15            },
16            messages: {
17                username: {
18                    required: '请输入用户名',
19                    minlength: '用户名不能小于2个字符',
20                    maxlength: '用户名不能超过8个字符',
21                    remote: '用户名不存在'
22                },
23                password: {
24                    required: '请输入密码',
25                    minlength: '密码不能小于2个字符',
26                    maxlength: '密码不能超过10个字符'
27                },
28            },
29
30            highlight: function(element, errorClass, validClass) {
31                $(element).addClass(errorClass).removeClass(validClass);
32                $(element).fadeOut().fadeIn();
33            },
34            unhighlight: function(element, errorClass, validClass) {
35                $(element).removeClass(errorClass).addClass(validClass);
36            },
37            submitHandler: function (form) {
38                // data={};
39                // data.name=$("#username").val();
40                // data.pwd=$("#password").val();
41                // $.post(url,data,function(data,status){
42                // alert("数据:" + data + "\n状态:" + status);
43                // })
44                console.log($(form).serialize())
45            }
46        });
47
48        $("#btn-login").click(function () {
49            console.log($("#demoForm").valid() ? "填写正确" : "填写不正确");
50        });
51    });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.