Chrome在本地主机上阻止JavaScript [英] Chrome blocking javascript on localhost

查看:109
本文介绍了Chrome在本地主机上阻止JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WAMP在本地机器(Windows 7 Ultimate x64)上开发一个站点,运行APACHE v2.2.22,PHP 5.3.13和MySQL v5.5.24。我正在开发使用Chrome v 22.0.1229.94。然而,我在网站上有相当一部分的JavaScript,而Chrome则无情地阻止了javascript在页面上运行。



点击小阻止javascript地址栏中的此页面图标包含下拉菜单,其中包含始终允许在本地主机上使用Javascript的下拉菜单,并且Chrome的设置中也存在JavaScript异常,并明确表示始终允许在http:// localhost上使用JavaScript。

Cookies被允许,允许所有网站运行JavaScript被关闭,我不知道Chrome为什么不允许JavaScript运行。 / p>

总体而言,由于IE9和Firefox 16.1都允许使用JavaScript,我可以利用它们,所以我找出解决方案并不是必须的。我只是很好奇,如果有什么我可以在Chrome中解决这个问题的话,我想继续在Chrome中进行开发。

解决方案

如果您注意到JavaScript仅在控制台处于打开状态时被阻止(如有人所说),则可能是您在控制台设置中禁用了JavaScript。


  1. 打开控制台。

  2. 单击右上角的垂直省略号图标(或旧版本的齿轮图标)并转到设置。

  3. 查看是否选中了禁用JavaScript复选框。


I'm working on developing a site on my local machine (Windows 7 Ultimate x64) using WAMP, running APACHE v2.2.22, PHP 5.3.13, and MySQL v5.5.24. I'm developing using Chrome v 22.0.1229.94. I've got quite a bit of javascript in the site, however, and Chrome is relentlessly blocking javascript from running on the page.

Clicking on the little 'blocked javascript on this page' icon in the address bar includes the dropdown that has "Always allow Javascript on Localhost" checked off, and I also have a JavaScript exception in Chrome's settings explicitly saying to always allow JavaScript on 'http://localhost'.

Cookies are being allowed, "Allow all sites to run JavaScript" is checked off, and I have no idea as to why Chrome is not allowing the JavaScript to run.

Overall, it's not imperative to the project that I figure out a fix as both IE9 and Firefox 16.1 are allowing JavaScript and I can utilize them. I am simply curious if there's anything I can do to fix this in Chrome, as I would like to continue developing in Chrome.

解决方案

If you notice that JavaScript is only blocked when the console is open (as some are saying), chances are that you disabled JavaScript in the console settings.

  1. Open the console.
  2. Click the vertical ellipsis icon (or the gear icon on older versions) in the upper right and go to settings.
  3. See if the "Disable JavaScript" checkbox is checked.

这篇关于Chrome在本地主机上阻止JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆