1. 程式人生 > >js問題 Cannot read property 'messages' of undefined

js問題 Cannot read property 'messages' of undefined

Cannot read property 'messages' of undefined

1.在這個js引入之前嘗試輸出$.validator(判斷$.validator有沒被定義)

A:應該會輸出沒有的(說明頁面上沒引入);在idea裡點這個messages是能跳轉的,但並不能說明在html上引入了

2.在HTML上馬上引入js(必須是在這個js之前),嘗試輸出$.validator.messages

總結 嘗試輸出 'messages' of undefined  這個東西或這個的上級