Unsafe JavaScript attempt to access frame with URL https://xxx with URL http://xxx.

Unsafe JavaScript attempt to access frame with URL https://xxx with URL http://xxx. The frame requesting access has a protocol of 'http', the frame being accessed has a protocol of 'https'. Protocols must match.

   在做某铁道部网站的某个小工具时遇到这个问题。具体看下面截图:

   追究其原因是因为 http://www.12306.cn/mormhweb/kyfw/ 使用的HTTP协议,而frame内嵌的网页使用的HTTPS协议,协议不匹配,所以访问不了,下面再上张图,你懂的:

原文地址:https://www.cnblogs.com/feichexia/p/UnsafeJavaScriptAccessFrame.html