Not allowed to load local resource: file

前端 未结 3 1724
南笙
南笙 2020-12-11 15:05

I am using the code below to create a link, when I click on the link in IE it\'s working and I\'m able to open the URL but not in Chrome.

Test

        
3条回答
  •  一生所求
    2020-12-11 15:54

    When you try to open a file with FILE:\\\\ via javascript in IE. IE will not allow you to open it (which is a by default behaviour) because of some security restrictions. I have faced this IE security issue before in multiple projects. You can try changing IE security settings as given below, but its not recommended (since you cannot change each and every User's setting to change the behaviour).

    Following settings works for IE 8

    In Internet Explorer, go to Tools → Internet Options → Advanced. Scroll down to the Security section and check the box for "Allow active content to run on files on My Computer".

提交回复
热议问题