上网既令人愉快又令人沮丧。用户在尝试访问某些网页时会遇到许多错误。其中一些错误很容易解决,而其他错误可能会让人头疼。javascript:void(0) 错误属于后一类。
Windows 10 用户在尝试访问Google Chrome上的某些网站时可能会遇到 javascript:void(0) 。然而,这个错误并不是谷歌浏览器(Google Chrome)独有的,可以在任何浏览器上遇到。javascript:void(0) 不是一个非常严重的问题,主要是由于某些浏览器设置的错误配置而引起的。出现错误的可能原因有两个——首先(– First),某些东西从用户端阻止了网页上的JavaScript,其次,JavaScript 编程中的错误(JavaScript programming)的网站。如果错误是由于后一种原因引起的,则您无能为力,但如果是由于您自己的一些问题,您可以采取多种措施来修复它。
我们将讨论您可以用来解决 javascript:void(0) 错误并因此 3access 网页的所有方法。
如何修复 Javascript:void (0)?(How To Fix Javascript:void (0)?)
从名称中可以明显看出,Javascript :void (0) 与Javascript有关。Javascript是在所有浏览器中都可以找到的插件/插件,它可以帮助网站正确呈现其内容。要解决Javascript :void(0) 错误,我们首先要确保在浏览器中启用了插件。接下来(Next),如果错误仍然存在,我们将在禁用所有第三方扩展之前删除缓存和 cookie 。(cache and cookies)
方法 1:确保Java已正确安装和更新
在我们开始使用浏览器内方法之前,让我们确保Java已正确安装在我们的个人计算机上。
1.通过以下任何一种方法启动命令提示符(Command Prompt)
- 按Windows 键(Windows key)+ R 打开运行(Run),键入 cmd(type cmd),然后按 enter(press enter)。
- 按Windows 键(Windows key)+ X 或右键单击开始按钮(start button),然后从高级用户菜单(power user menu)中选择命令提示符(Command Prompt)。
- (Type command)在搜索栏中(search bar and click)键入命令提示符,然后在搜索返回时单击打开。
2. 在命令提示符窗口(command prompt window)中,输入java -version并回车。
注意:(Note:)或者,启动Control Panel,单击Program & Features并尝试找到Java)
有关您个人计算机上安装的当前java 版本(java version)的详细信息应该会在一段时间后出现。如果没有返回信息,很可能您的计算机上没有安装 java。此外,如果您确实安装了 java,请交叉检查您是否拥有更新的版本。截至 2020 年 4 月 14 日的最新 Java 版本是 1.8.0_251 版(The latest java version as of 14th of April 2020 is version 1.8.0_251)
同样,如果您在Program and Features中没有找到Java,则说明您的计算机上没有安装它。
要在您的计算机上安装Java,请访问以下站点下载免费 Java 软件(Download Free Java Software)并单击Java 下载(Java Download)(然后单击同意并开始免费下载(Agree and Start Free Download))。单击(Click)下载的文件并按照屏幕上的说明/提示安装 java。
安装完成后,再次打开命令提示符(command prompt),检查是否安装成功。
方法 2:启用 Javascript
大多数时候,默认情况下禁用Javascript插件。(Javascript)只需(Simply)启用插件即可解决 javascript:void(0) 错误。以下是在三种不同浏览器(即Google Chrome(Google Chrome)、Microsoft Edge/Internet Explorer和Mozilla Firefox)上启用 javascript 的分步指南。
要在 Google Chrome 中启用 JavaScript:(To enable JavaScript in Google Chrome:)
1.通过双击桌面上的图标或单击任务栏中的Chrome 图标(Chrome icon)打开 Google Chrome(Open Google Chrome)。
2. 点击右上角的三个(right-hand corner)垂直点(three vertical dots)(旧版本为三个水平条)打开自定义和更改 Chrome 设置菜单(customize and change Chrome settings menu)。
3. 从下拉菜单中,单击设置(Settings )以打开 Chrome 设置选项卡。
(或者,打开一个新的chrome 选项卡(chrome tab)(ctrl + T),在地址栏中输入 chrome://settings并按 enter(address bar and press enter))
4. 在隐私和安全标签(Privacy and security label)下,单击站点设置(Site Settings)。
注意:(Note:)如果您运行的是旧版本的Chrome,隐私(Privacy)设置可以在Advanced Settings下找到,并且在那里,Site Settings将被标记为 Content Settings。
5. 向下滚动以找到JavaScript并单击它。
6. 最后,通过单击切换开关启用(clicking on the toggle switch.)JavaScript 选项。(JavaScript option)
注意:(Note:)在旧版本中,在JavaScript下,启用Allow all sites to run JavaScript 并按 OK(JavaScript and press OK)。
To enable JavaScript in Internet Explorer/Edge:
1.通过双击桌面上的图标启动Microsoft Edge 。
2. 单击右上角的三个(right-hand corner)水平点(three horizontal dots)以打开“设置和更多”菜单。或者,按键盘快捷键(keyboard shortcut)Alt + F.
3. 点击设置(Settings)。
4. 在左侧面板中,单击站点权限(Site Permissions)
注意:(Note:)您也可以打开一个新标签页,在地址栏中(address bar)输入“edge://settings/content” ,然后回车(press enter)。
5. 在站点(Site)权限菜单中,找到JavaScript并单击它。
6. 单击切换开关以启用 JavaScript(toggle switch to enable JavaScript)。
如果您使用的是旧版本的Internet Explorer之一,则上述过程可能不适用于您。请按照以下步骤操作。
1. 打开Internet Explorer,点击工具(Tools )(右上角的(right-hand corner)齿轮图标),然后选择Internet 选项(Internet Options)。
2. 切换到安全(Security )选项卡并单击自定义级别..( Custom level..) 按钮
3. 向下滚动以找到Scripting标签并在其下Enable Scripting of Java applet(Enable Scripting of Java applets)。
要在 Mozilla Firefox 上启用 JavaScript:(To enable JavaScript on Mozilla Firefox:)
1. 启动 Firefox 并点击右上角(right-hand corner)的汉堡图标(click on the hamburger icon)(三个水平条)。
2. 点击加载项(Add-ons)(或直接按 ctrl + shift + A)。
3. 单击左侧的插件选项。( Plug-ins)
4. 单击Java™ Platform插件并选中始终激活(always activate)按钮。
方法三:绕过缓存重载(Cache)
如果该错误是暂时的并且您在过去几分钟/几小时内一直在经历该错误,则可以更轻松地修复该错误。只需(Simply)在绕过缓存文件的同时刷新网页。这有助于避免损坏和过时的缓存文件。
通过绕过缓存重新加载
1. 按住shift 键( shift key),同时单击重新加载按钮。( reload button.)
2. 按键盘快捷键 ctrl + f5(对于Mac用户:Command + Shift + R)。
方法四:清除缓存
缓存(Cache)是您的网络浏览器存储的临时文件,用于更快地重新打开以前访问过的网页。但是,当这些缓存文件损坏或过时时,可能会出现问题。删除损坏/过时的缓存文件应该有助于解决由它们引起的任何问题。
要清除 Google Chrome 中的缓存:(To clear cache in Google Chrome:)
1.再次(Again)单击三个垂直点并选择Chrome 设置( Chrome Settings)。
2. 在隐私和安全标签(Privacy and security label)下,单击清除浏览数据(Clear Browsing Data)。
或者,按Ctrl + shift + del键直接打开“清除浏览数据”窗口。
3. 选中/勾选缓存图像和文件(Cached images and files)旁边的框。
4. 单击时间范围(Time range)选项旁边的下拉菜单,然后从菜单中选择适当的时间范围(time frame)。
5. 最后,点击清除数据按钮(Clear Data button)。
To clear cache in Microsoft Edge/Internet Explorer:
1. 打开Edge,点击“设置(Settings)和更多”按钮(三个水平点)并选择设置(Settings)。
2. 切换到隐私和服务(Privacy and services)选项卡,然后单击“选择要清除的内容”(‘Choose what to clear’)按钮。
3. 选中“缓存图像和文件(Cache images and files)”旁边的框,选择适当的时间范围(Time Range),然后单击立即清除(Clear Now)。
清除 Firefox 中的缓存:(To clear cache in Firefox:)
1. 启动Firefox,点击汉堡图标(hamburger icon),然后选择选项(Options)。
2.通过单击切换到隐私和安全选项卡。(Privacy & Security)
3.向下滚动(Scroll)找到历史标签并点击(History label and click)清除历史(Clear History…)...按钮
4.勾选缓存(Cache)旁边的框,选择要清除的时间范围(time range),然后单击立即清除(Clear Now)。
另请阅读:(Also Read:)如何在Android上删除(Android)浏览器历史记录(Browser History)
方法 5:清除 Cookie
Cookies 是另一种存储的文件类型,用于改善您的网络浏览体验。它们可以帮助网站记住您的偏好。与缓存文件类似,损坏或过期的 cookie 可能会导致多个错误,因此如果上述方法均未解决 javascript:void(0) 错误,作为最后的手段,我们也将删除浏览器 cookie。
要清除 Google Chrome 中的 cookie:(To clear cookies in Google Chrome:)
1.按照(Follow)上一方法中的步骤 1,2 和 3 启动清除浏览数据(Clear Browsing Data)窗口。
2. 这一次,选中Cookies and other site data(Cookies and other site data)旁边的框。从时间范围菜单(Time Range menu)中选择适当的时间(time frame)范围。
3. 单击清除数据(Clear Data)。
要清除 Microsoft Edge 中的 cookie:(To clear cookies in Microsoft Edge:)
1.再次(Again),在Edge 设置(Edge Settings and click)中找到隐私和服务选项卡(Privacy and services tab),然后单击清除浏览数据下方的“选择要清除的内容” 。(‘Choose what to clear’)
2. 勾选“Cookies and other site data”(‘Cookies and other site data’)旁边的复选框,选择合适的时间范围(Time Range),最后点击立即清除(Clear now)按钮。
要清除 Mozilla Firefox 中的 cookie:(To clear cookies in Mozilla Firefox:)
1. 切换到Firefox设置中的(Firefox)隐私和安全(Privacy & Security)选项卡,然后单击Cookies 和站点数据下的(Site Data)清除数据(Clear Data)按钮。
2. 确保选中/勾选Cookies 和站点数据(Cookies and Site Data)旁边的框,然后单击清除(Clear)。
方法 6:禁用所有扩展/附加组件
Javascript 错误(Javascript error)也可能是由于与您在浏览器上安装的第三方扩展程序冲突引起的。我们将暂时禁用所有扩展并访问网页以查看 javascript:void(0) 是否得到解决。
要禁用 Google Chrome 上的所有扩展程序:(To disable all extensions on Google Chrome:)
1. 单击三个垂直点并选择更多工具(More Tools)。
2. 从更多工具子菜单中,单击扩展(Extensions)。
或者,打开一个新选项卡,在URL 栏中输入 chrome://extensions 并按 enter(URL bar and press enter)。
3. 继续并通过单击其名称旁边的切换开关来(toggle switches next to their names)单独禁用所有扩展。
要禁用 Microsoft Edge 中的所有扩展:(To disable all extensions in Microsoft Edge:)
1. 单击三个水平点并选择扩展(Extensions)。
2. 现在继续并通过单击它们旁边的切换开关来单独禁用所有扩展。
要禁用 Mozilla Firefox 中的所有扩展:(To disable all the extensions in Mozilla Firefox:)
1. 点击汉堡图标并选择(hamburger icon and select) 附加组件(Add-ons)。
2. 切换到扩展(Extensions)选项卡并禁用所有扩展。
推荐的:(Recommended:)
- 如何修复戴尔诊断错误(Fix Dell Diagnostic Error)2000-0142
- 如何在Windows上更改(Windows)主要和次要显示器(Primary & Secondary Monitor)
如果以上方法都没有帮助您解决 javascript:void(0) 错误(resolve the javascript:void(0) error),请尝试重新安装浏览器。但是,如果其中一种方法确实有帮助,请在下面的评论中告诉我们是哪一种!
How to Fix javascript:void(0) Error
Surfing the internet is as pleаsurable aѕ it iѕ frυstrating. Users face a number of errors when trying to access certain webpages. Some of these errors are quite easу to resolve while others can be a pain in the neck. The javascript:voіd(0) еrror falls under the latter class.
The javascript:void(0) may be experienced by windows 10 users while trying to access certain websites on Google Chrome. However, this error is not unique to Google Chrome and can be encountered on any browser out there. The javascript:void(0) is not a very serious problem and primarily arises due to a misconfiguration of certain browser settings. There are two possible reasons why the error may have surfaced – First, something is blocking the JavaScript on the webpage from the user end, and second, an error in the JavaScript programming of the website. If the error is caused due to the latter reason, there is nothing you can do about it but if it is due to some problems on your part, there are multiple things you can do to fix it.
We will be discussing all the methods you can employ to resolve the javascript:void(0) error and therefore, 3access the webpage.
How To Fix Javascript:void (0)?
As obvious from the name, the Javascript:void (0) has something to do with Javascript. Javascript is a plugin/addon found in all the browsers and it helps websites render their content properly. To resolve the Javascript:void(0) error, we will first make sure that the addon is enabled in the browser. Next, if the error still persists, we will be deleting cache and cookies before disabling all third party extensions.
Method 1: Ensure Java is properly installed and updated
Before we get started with the in-browser methods, let’s make sure Java is properly installed on our personal computers.
1. Launch Command Prompt by any of the following methods
- Press Windows key + R to open Run, type cmd, and press enter.
- Press Windows key + X or right-click on the start button and select Command Prompt from the power user menu.
- Type command prompt in the search bar and click on open when the search returns.
2. In the command prompt window, type java -version and press enter.
Note: Alternatively, launch Control Panel, click on Program & Features and try to locate Java)
Details regarding the current java version installed on your personal computer should appear in some time. If no information returns, it is likely that you do not have java installed on the computer. Also, if you do have java installed, cross-check that you have the updated version. The latest java version as of 14th of April 2020 is version 1.8.0_251
Similarly, if you do not find Java in Program and Features, you do not have it installed on your computer.
To install Java on your computer, head to the following site Download Free Java Software and click on Java Download (and then on Agree and Start Free Download). Click on the downloaded file and follow the onscreen instructions/prompts to install java.
Once installed, open command prompt again and check if the installation was successful.
Method 2: Enable Javascript
Most times, the Javascript addon is disabled by default. Simply enabling the add-on should solve the javascript:void(0) error. Below are the step-by-step guides to enable javascript on three different browsers, namely, Google Chrome, Microsoft Edge/Internet Explorer, and Mozilla Firefox.
To enable JavaScript in Google Chrome:
1. Open Google Chrome by either double-clicking on its icon on your desktop or clicking once on the Chrome icon in the taskbar.
2. Click on the three vertical dots (three horizontal bars in older versions) located at the top right-hand corner to open the customize and change Chrome settings menu.
3. From the drop-down menu, click on Settings to open the Chrome settings tab.
(Alternatively, open a new chrome tab (ctrl + T), type chrome://settings in the address bar and press enter)
4. Under Privacy and security label, click on Site Settings.
Note: If you are running an older version of Chrome, Privacy settings can be found under Advanced Settings, and in there, Site Settings will be labelled as Content Settings.
5. Scroll down to find JavaScript and click on it.
6. Finally, enable the JavaScript option by clicking on the toggle switch.
Note: In older versions, under JavaScript, enable Allow all sites to run JavaScript and press OK.
To enable JavaScript in Internet Explorer/Edge:
1. Launch Microsoft Edge by double-clicking on its icon on the desktop.
2. Click on the three horizontal dots present at the top right-hand corner to open the ‘Settings & more’ menu. Alternatively, press the keyboard shortcut Alt + F.
3. Click on Settings.
4. In the left-hand panel, click on Site Permissions
Note: You can also open a new tab, enter ‘edge://settings/content’ in the address bar, and press enter.
5. In the Site permissions menu, locate JavaScript, and click on it.
6. Click on the toggle switch to enable JavaScript.
If you are using one of the older versions of Internet Explorer, the above procedure might not apply for you. Follow the below procedure instead.
1. Open Internet Explorer, click on Tools (gear icon located at the top right-hand corner) and then select Internet Options.
2. Switch to the Security tab and click on the Custom level.. button
3. Scroll down to find the Scripting label and under it Enable Scripting of Java applets.
To enable JavaScript on Mozilla Firefox:
1. Launch Firefox and click on the hamburger icon (three horizontal bars) at the top right-hand corner.
2. Click on Add-ons (or directly press ctrl + shift + A).
3. Click on Plug-ins options present on the left side.
4. Click on the Java ™ Platform plugin and check the always activate button.
Method 3: Reload by Bypassing the Cache
The error can be fixed even more easily if it is temporary and you have been experiencing it for just the past couple of minutes/hours. Simply refresh the webpage while bypassing the cache files. This helps in avoiding corrupted and outdated cache files.
To reload by bypassing the cache
1. Press the shift key and hold it while you click on the reload button.
2. Press the keyboard shortcut ctrl + f5 (For Mac Users: Command + Shift + R).
Method 4: Clear Cache
Cache are temporary files stored by your web browsers to make reopening previously visited web pages faster. However, problems may arise when these caches files become corrupted or outdated. Deleting the corrupted/outdated cache files should help resolve any issues caused by them.
To clear cache in Google Chrome:
1. Again, click on the three vertical dots and select Chrome Settings.
2. Under Privacy and security label, click on Clear Browsing Data.
Alternatively, press the keys Ctrl + shift + del to directly open the Clear Browsing Data window.
3. Check/Tick the box next to Cached images and files.
4. Click on the drop-down menu next to the Time range option and from the menu select an appropriate time frame.
5. Finally, click on the Clear Data button.
To clear cache in Microsoft Edge/Internet Explorer:
1. Open Edge, click on the ‘Settings and more’ button (three horizontal dots) and select Settings.
2. Switch over to the Privacy and services tab and click on the ‘Choose what to clear’ button.
3. Check the box next to ‘Cache images and files’, select an appropriate Time Range, and then click on Clear Now.
To clear cache in Firefox:
1. Launch Firefox, click on the hamburger icon, and select Options.
2. Switch to the Privacy & Security tab by clicking on the same.
3. Scroll down to find the History label and click on the Clear History… button
4. Tick the box next to Cache, select a time range to clear and click on Clear Now.
Also Read: How to Delete Browser History On Android
Method 5: Clear Cookies
Cookies are another type of file stored to make your web browsing experience better. They help websites remember your preferences among other things. Similar to cache files, corrupt or outdated cookies can cause multiple errors so if none of the above methods resolved the javascript:void(0) error, as a final resort we will be deleting the browser cookies too.
To clear cookies in Google Chrome:
1. Follow steps 1,2 and 3 from the previous method to launch the Clear Browsing Data window.
2. This time, check the box next to Cookies and other site data. Select an appropriate time frame from the Time Range menu.
3. Click on Clear Data.
To clear cookies in Microsoft Edge:
1. Again, find your way to the Privacy and services tab in Edge Settings and click on ‘Choose what to clear’ below Clear browsing data.
2. Check the box next to ‘Cookies and other site data’, select an appropriate Time Range, and finally click on the Clear now button.
To clear cookies in Mozilla Firefox:
1. Switch to Privacy & Security tab in Firefox settings and click on the Clear Data button under Cookies and Site Data.
2. Make sure the box next to Cookies and Site Data is checked/ticked and click on Clear.
Method 6: Disable all extensions/add ons
The Javascript error can also be caused due to conflict with a third-party extension you have installed on your browser. We will temporarily disable all the extensions and visit the webpage to see if the javascript:void(0) gets resolved.
To disable all extensions on Google Chrome:
1. Click on the three vertical dots and select More Tools.
2. From the More Tools sub-menu, click on Extensions.
Alternatively, open a new tab, type chrome://extensions in the URL bar and press enter.
3. Go ahead and disable all the extensions individually by clicking on the toggle switches next to their names.
To disable all extensions in Microsoft Edge:
1. Click on three horizontal dots and select Extensions.
2. Now go ahead and disable all the extensions individually by clicking on the toggle switches next to them.
To disable all the extensions in Mozilla Firefox:
1. Click on the hamburger icon and select Add-ons.
2. Switch to the Extensions tab and disable all the extensions.
Recommended:
If none of the above methods helped you resolve the javascript:void(0) error, try reinstalling the browser. But if one of the methods did help, let us know which one was it in the comments below!