我使用 IE PrintTemplate 添加自定义页眉/页脚。 我在 Beyond Print Preview: Print Customization for Internet Explorer 5.5 中找到的打印模板示例. 但是当 bowser 呈现以下标签时通过 SSL
<IE:LAYOUTRECT ID='layoutrect1' CONTENTSRC='document' ONLAYOUTCOMPLETE='OnRectComplete()' NEXTRECT='layoutrect2' CLASS='lorstyle'/>
出现混合上下文警告:
This page contains both secure and nonsecure items. Do you want to display the nonsecure items?
当我将上下文 CONTENTSRC 更改为直接 URL 时,警告消息消失了。但是其他奇怪的问题出现了。
<IE:LAYOUTRECT ID='layoutrect1' CONTENTSRC='https://..' ONLAYOUTCOMPLETE='OnRectComplete()' NEXTRECT='layoutrect2' CLASS='lorstyle'/>
是否可以将 ActiveX(WebConrol2) 控件包含的文档标记为安全的(避免混合内容警告)?
最佳答案
只是想分享我找到的解决方案。
所描述的 IE 行为仅适用于 Internet Explorer 7。 如果打印模板是通过 URL 加载的(事件是通过 SSL 传输的),IE 会显示混合上下文警告。
如果您使用本地打印模板不会出现警告。 所以我将打印模板作为资源导入 ActiveX 控件并通过 res protocol 访问它.
关于internet-explorer - IE PrintTemplate 混合上下文警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1900310/