如何使用Javascript在Google Chrome中禁用网络安全? [英] How Do I Disable Web Security In Google Chrome By Using Javascript?
本文介绍了如何使用Javascript在Google Chrome中禁用网络安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过以下命令在命令提示符下禁用谷歌浏览器中的websecurity
startchromeC:\Program Files(x86)\Google \ Chrome \ Application \ chrome .exe - allow-file-access-from-files --disable-web-security ..
它对我有用..
但是每次我都需要运行命令提示符。所以我想让它成为默认行为,而不必每次都打开终端/命令行或自定义快捷方式。
I disabled websecurity in google chrome from command prompt by the following command
start "chrome" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-file-access-from-files --disable-web-security ..
It worked for me..
But every time i need to run the command prompt .So i want to make this the default behavior without having to open a terminal/command line or a custom shortcut every time.
推荐答案
你不要't。
安全功能的重点是阻止 javascript执行危险操作。如果有办法通过javascript禁用它,那么它根本不会提供任何保护。
You don't.
The whole point of the security features is to prevent javascript from performing dangerous actions. If there was a way to disable it through javascript, then it wouldn't provide any protection at all.
这篇关于如何使用Javascript在Google Chrome中禁用网络安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文