简体   繁体   English

网页浏览器加载 html 页面时出现脚本错误

[英]Script error when webbrowser loading html page

I'm trying to load local html page using webbrowser tool in Winforms but I got script error message and my page won't load, when I open that page using any web browser it opens with no problem at all!我正在尝试使用 Winforms 中的 webbrowser 工具加载本地 html 页面,但我收到脚本错误消息并且我的页面无法加载,当我使用任何网络浏览器打开该页面时,它打开时完全没有问题! I tried some solutions as editing registry but no fix.我尝试了一些解决方案作为编辑注册表但没有修复。
my html page has jscript code and this is the code in my page:我的 html 页面有 jscript 代码,这是我页面中的代码:

<html>
<head>
<script type="text/javascript"src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script type="text/javascript"src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js?cacheBust=56"></script>
<script type="text/javascript">
FusionCharts.ready(function () {
var csatGauge = new FusionCharts({
    "type": "angulargauge",
    "renderAt": "chart-container",
    "width": "400",
    "height": "250",
    "dataFormat": "json",
        "dataSource": {
               "chart": {
                  "caption": "Customer Satisfaction Score",
                  "subcaption": "Last week",
                  "lowerLimit": "0",
                  "upperLimit": "100",
                  "theme": "fint"
               },
               "colorRange": {
                  "color": [
                     {
                        "minValue": "0",
                        "maxValue": "50",
                        "code": "#e44a00"
                     },
                     {
                        "minValue": "50",
                        "maxValue": "75",
                        "code": "#f8bd19"
                     },
                     {
                        "minValue": "75",
                        "maxValue": "100",
                        "code": "#6baa01"
                     }
                  ]
               },
               "dials": {
                  "dial": [
                     {
                        "value": "67"
                     }
                  ]
               }
        }
  });

csatGauge.render();
});
</script>
</head>
<body>
<div id="chart-container">An angular guage will load here!</div>
</body>
</html>

I've managed to solve it by adding this code:我设法通过添加以下代码来解决它:

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
</head>

I'm still not sure if this is only thing needed or it worked with the change of the registry: solution我仍然不确定这是否是唯一需要的东西,或者它适用于注册表的更改: 解决方案

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

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