如何在IE中自动允许阻止的内容? [英] How to automatically allow blocked content in IE?

查看:116
本文介绍了如何在IE中自动允许阻止的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < html> 
< head>
< title>树演示< / title>
< script type =text / javascriptsrc =jquery.js>< / script>
< script type =text / javascriptsrc =jquery.jstree.js>< / script>
< script type =text / javascript>
$(document).ready(function(){
/ * $(#main)。jstree({
themes:{
theme:默认,
dots:false,
图标:false
},
插件:[themes,json_data,ui],
json_data:{
ajax:{
url:jsondata.json,
data:function(n){
return {id:n.attr?n.attr(id):0};
}
}
}
});

$ (#main)。bind(open_node.jstree,function(e,data){
// data.inst是触发此事件的实例
console.log(data);
console.log($。data(data.rslt.obj [0],folder_name));
});
$(#main ).bind(select_node.jstree,function(e,data){
// data.inst是触发此事件的实例
console.log(data);
console.log($。data(data.rslt.obj [0],folder_name));
}); * /

$(#main1)。jstree({
themes:{
theme:default,
dots: false,
图标:false
},
插件:[themes,html_data]
});

});
< / script>
< / head>
< body>
< div id =main1>
< ul>
< li>< a href =javascript:void(0)>主文件夹< / a>
< ul>
< li>< a href =javascript:void(0)> Sub Folder1< / a>< / li>
< li>< a href =javascript:void(0)> Sub Folder2< / a>< / li>
< / ul>< / li>
< li>< a href =javascript:void(0)>共享文件夹< / a>
< ul>
< li>< a href =javascript:void(0)>共享文件夹1< / a>< / li>
< li>< a href =javascript:void(0)>共享文件夹2< / a>< / li>
< / ul>< / li>
< / ul>
< / div>
< div id =main>
< / div>
< / body>
< / html>

当我在IE浏览器中运行上面的代码时,它显示页面顶部(在URL栏下方)如



为了保护您的安全,Internet Explorer已经限制此网页运行可以访问您计算机的脚本或Activex控件。 >

当我点击并点击允许的阻止内容时,它会运行。但是我想要没有这个弹出消息我需要运行代码...我怎么能自动运行这个? 。

解决方案

我相信这只会在本地运行页面时出现,例如在加载时不应该看到这个 然而如果您有权这样做,您可以按照以下步骤关闭Internet Explorer的提示: em>工具(menu)→ Internet选项安全性(标签)→ 自定义级别(按钮)→和禁用 自动提示ActiveX控件



这当然只会影响您的浏览器。


I am using below code for sample menu.

    <html>
<head>
<title>Tree Demo</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.jstree.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
/*       $("#main").jstree({
                "themes" : {
                    "theme" : "default",
                    "dots" : false,
                    "icons" : false
                },
                "plugins" : [ "themes", "json_data", "ui"],
                "json_data" : {
                    "ajax" : {
                        "url" : "jsondata.json",
                        "data" : function (n) {
                            return { id : n.attr ? n.attr("id") : 0 };
                        }
                    }
                }
        });

         $("#main").bind("open_node.jstree", function (e, data) {
                     // data.inst is the instance which triggered this event
                     console.log(data);
                     console.log($.data(data.rslt.obj[0],"folder_name"));
        });
        $("#main").bind("select_node.jstree", function (e, data) {
             // data.inst is the instance which triggered this event
             console.log(data);
             console.log($.data(data.rslt.obj[0],"folder_name"));
        }); */

         $("#main1").jstree({
                "themes" : {
                    "theme" : "default",
                    "dots" : false,
                    "icons" : false
                },
                "plugins" : [ "themes", "html_data"]
        });

    });
</script>
</head>
<body>
    <div id="main1">
        <ul>
            <li><a href="javascript:void(0)">Home Folder</a>
                <ul>
                    <li><a href="javascript:void(0)">Sub Folder1</a></li>
                    <li><a href="javascript:void(0)">Sub Folder2</a></li>
                </ul></li>
            <li><a href="javascript:void(0)">Shared Folders</a>
                <ul>
                    <li><a href="javascript:void(0)">Shared Folder1</a></li>
                    <li><a href="javascript:void(0)">Shared Folder2</a></li>
                </ul></li>
        </ul>
    </div>
    <div id="main">
    </div>
</body>
</html>

when i run the above code in IE browsers it shows top of the page(below the URL bar) like

" To help protect your security , internet explorer has restricted this webpage from running scripts or Activex controls that could access your computer. click for options.. "

when i rightclick and click allowed blocked content, it runs.but i want without this popup message i need to run the code...how can i automatically run this one?...

解决方案

I believe this will only appear when running the page locally in this particular case, i.e. you should not see this when loading the apge from a web server.

However if you have permission to do so, you could turn off the prompt for Internet Explorer by following Tools (menu) → Internet OptionsSecurity (tab) → Custom Level (button) → and Disable Automatic prompting for ActiveX controls.

This will of course, only affect your browser.

这篇关于如何在IE中自动允许阻止的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆