10
考慮使用jQuery這個HTML驗證jQuery驗證遺漏的類型錯誤:無法調用 '的getAttribute' 未定義
<input id="accept-terms" type="checkbox" class="required"/>
<label for="accept-terms"> I accept the <asp:HyperLink ID="termsLink" runat="server" Target="_blank">terms and condtions</asp:HyperLink> of sale.</label>
<label for="accept-terms" class="error-text">You must accept the terms and conditions before purchasing</label>
我得到這個錯誤:
Uncaught TypeError: Cannot call method 'getAttribute' of undefined
如果您在另一個表單中有表單,這顯然也會發生。 –
我與TextArea有同樣的問題,它已經有一個屬性「名稱」 – mbmihura
只是讀取它也可能是因爲缺少規則名稱。在我的情景中,我創建了一個自定義規則,沒有正確加載,並且驗證程序無法找到它(所以它拋出了「Uncaught TypeError:無法調用未定義的方法'getAttribute') – mbmihura