0

类似的 如何获取指定为 <script> 标记的“src”的文件的内容?使用 Javascript 获取脚本文件的内容,我想使用脚本标签加载 xml 文件以使用 javascript 代码 - 只有我需要它在本地运行。那么如何访问使用脚本标签加载的文件的内容呢?

4

1 回答 1

0

You can not achieve this one locally. Loading the script will execute it and won't give you access to the src so then the only option you would have is to load the file as an ajax call. But ajax calls don't work locally (due to security) .

于 2013-07-03T13:37:03.607 回答