[英]How to fix this error : Cannot read properties of undefined (reading 'length') in Javascript
[英]ERROR: "Cannot read properties of undefined (reading 'getInlineAnchor')" in console inside browser while checking javascript outputs,?
我今天開始學習 javascript,我運行了第一個程序,甚至在 js 文件中寫任何東西之前,
錯誤截圖點擊這里
我的瀏覽器控制台拋出錯誤:“contents.c10c11b1.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'getInlineAnchor')”
如何解決這個問題?
我創建了一個僅包含樣板代碼和單個 output 行的 index.html 文件,並鏈接了空的 working.js 文件,但仍然會拋出錯誤。
下面給出 index.html 文件:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Basic working</title>
</head>
<body>
<h1>Hellox</h1>
<script src="working.js"></script>
</body>
</html>
working.js 文件是空的,即使我在其中寫入 console.log("hello"),它也會在控制台上成功打印 hello,但仍然會拋出上述錯誤(附上圖片以供參考)
瀏覽器中存在的擴展程序是導致錯誤的主要原因。 您可以有效地禁用擴展。
使用 incognito window 意味着安裝的擴展沒有干擾(前提是您不允許在隱身模式下訪問您的擴展,在這種情況下可以在擴展設置中輕松禁用它)圖像顯示擴展訪問設置
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.