加载本地JavaScript文件中铬的测试? [英] Load local javascript file in chrome for testing?

查看:123
本文介绍了加载本地JavaScript文件中铬的测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想考验我的地方使用Chrome浏览器而Chrome将不会加载本地资源的一些JavaScript。有一个简单的工作围绕这个?

I am trying to test some javascript on my local using the Chrome browser but Chrome will not load local resources. Is there an easy work around for this?

推荐答案

要在Chrome加载本地资源,只使用本地计算机,而不是用你需要添加Web服务器时--allow-文件访问从 - 文件旗。

To load local resources in Chrome when just using your local computer and not using a webserver you need to add the --allow-file-access-from-files flag.

您可以有一个快捷方式到Chrome浏览器,允许访问文件和一个没有。

You can have a shortcut to Chrome that allows files access and one that does not.

在桌面上创建一个Chrome浏览器快捷方式,右键点击快捷方式,选择属性。在打开找到捷径的目标和的chrome.exe后面添加参数留下空间对话框

Create a shortcut for Chrome on the desktop, right click on shortcut, select properties. In the dialog box that opens find the target for the short cut and add the parameter after chrome.exe leaving a space

例如C:\\ PATH TO \\ --​​allow的chrome.exe文件访问 - 从 - 文件

eg C:\PATH TO\chrome.exe --allow-file-access-from-files

此快捷方式将允许访问文件,而不会影响其他的快捷方式到Chrome你。

This shortcut will allow access to files without affecting any other shortcut to Chrome you have.

当你打开浏览器使用此快捷方式,应该允许使用HTML5和文件系统API的加载本地资源

When you open Chrome with this shortcut it should allow local resources to be loaded using HTML5 and the filesystem api

这篇关于加载本地JavaScript文件中铬的测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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