实现返回顶部功能

This commit is contained in:
Argo-Lenovo 2016-10-23 23:18:18 +08:00
parent 9da2b60db1
commit baf679ee11
1 changed files with 7 additions and 0 deletions

View File

@ -126,4 +126,11 @@ $(function () {
return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$/.test(value);
}, "请填写正确的IP地址");
}
$(".go-top").click(function (e) {
e.preventDefault();
$('#main-content').animate({
scrollTop: 0
}, 200);
});
});