我正在創建一個登錄頁面,但我不確定為什么沒有加載驗證腳本。昨天我能夠登錄而沒有像這樣的錯誤。但是,當我今天嘗試登錄時,遇到了此錯誤。這是我的腳本的位置嗎?我試過重新排列腳本,并檢查其他文件,例如我的 js 和 jquery.validate.min.js 的文件位置,但一切似乎都很好。.html<meta http-equiv="content-type" content="text/html; charset=UTF-8" /><!--<meta http-equiv="refresh" content="5">--><!--<meta http-equiv="X-UA-Compatible" content="IE=edge" />--><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="css/index.css"><link rel="stylesheet" href="https://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /><script src="https://code.jquery.com/jquery-1.9.1.js"></script><script src="https://code.jquery.com/ui/1.10.2/jquery-ui.js"></script><link href="../Content/bootstrap.min.css" rel="stylesheet" /><script src="lib/jquery.validate.min.js"></script><!--<link href="css/jquery.mobile-1.4.5.min.css" rel="stylesheet" />--><script src="scripts/common.js"></script>.JSvar userid;var password; $(document).ready (function () { $("#LoginForm").validate({ // this line is the error highlighted in console messages: { txtLogin: "User ID is required", txtPassword: "Password is required", },我相信我應該能夠在解決這個問題后登錄,因為我已經正確配置了我的 PHP 和其他文件。JS 文件似乎也不錯。
類型錯誤:$(...).validate 不是函數
慕哥9229398
2021-12-02 16:36:24