Comments (2)
那个呢,因为 Chrome 有一些安全性的考虑不随便让你读本地数据呢(看 issue #1)。最简单的解决方法是在 chrome 启动的时候就告诉它,我这个代码很安全不要你管~
具体操作的话,可以先把所有 chrome 窗口都关掉,然后在命令行用这个命令启动 Chrome (记得替换 chrome.exe 的实际路径)
C:\Users\<你的用户名>\AppData\Local\Google\Chrome\Application\chrome.exe --allow-file-access-from-files
其他的解决方法也有,比如可以干脆在本地起一个 http 的服务,或者用个打包器把零散的图片打包到代码里之类的~
from stgame.
舍不得关Chrome 所以一直没试(常年15+tab烤机) 然后今天用IE开了一下 居然有用了。。。看了一下stackoverflow大概是安全性原因?话说我主要还是想看看JS源码学习学习 还特地到stackoverflow上问了一下你代码中的(function(RES){})然后呢一开始好多人说没意义 不过还是有细心的大佬发现是用eval()()调用的Orz话说像我这种非科班的小白 通过学语言→学数据结构算法→阅读源码→依葫芦画瓢尝试编写项目这种思路可行吗QAQ
from stgame.
Related Issues (7)
- Chrome security issues when opened from local disk
- Too low performance when page zoomming in Chrome
- Mask layers randomly disappearing in Chrome HOT 3
- Background layers randomly disappeared in Firefox28 HOT 2
- Layer jittering when scrolling the background very slowly in Chrome33 HOT 1
- transform-style: perserve-3d is not supported in IE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stgame.