简体   繁体   English

JavaScript文件的本地路径在加载到WebBrowser控件本地HTML页面下无法正常工作

[英]Local path to JavaScript file are not working under loaded to WebBrowser control local HTML page

So I am loading local HTML file without any problem but JavaScripts are not working at all. 因此,我正在加载本地HTML文件,没有任何问题,但是JavaScript根本无法正常工作。

This html & JS has index.html that is loading to WebBrowser control. 此html&JS具有index.html,它正在加载到WebBrowser控件中。

<video width="640" height="360" style=" margin: 0 !important; padding: 0 !important;  overflow:hidden;"    id="player1" src="http://archive.bogi.ru/files/S2J4NW1xUVVqb2NKLWZINnE4bFFKb3VxY25TU1FsZWo5aTZpVlltWUk5R3lxSk5vCmllYWJiLVZ3LUZ0cTZ1UjRCYV9nUy1fbVMzMjQyblRhVHYxa2lB" type="video/mp4" > </video>


<script>
    MediaElement('player1', {
        success: function (me) {
            me.play();
        }
    }); </script>

Any clue how it could be fixed? 任何线索如何解决?

在此处输入图片说明

PS I have enabled this option: Internet Options > Advanced > Security > Allow active content to run in files on My Computer. PS我已启用此选项: Internet选项>高级>安全性>允许活动内容在“我的电脑”上的文件中运行。

I already had this problem(when you link to jquery file) 我已经遇到了这个问题(当您链接到jquery文件时)

Instead of link to src to your jquery file copy jquery file content between this tag: 代替将src链接到您的jquery文件,请在此标签之间复制jquery文件的内容:

<script type="text/css">
//Copy First jquery content here
</script>
<script type="text/css">
//Copy secound jquery content here
</script>
.
.
.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM