[英]Why does my code break when I try to attach my methods to the class prototype?
[英]Why does my code break when I change the URL in the Tableau sample to another URL?
当我将 Tableau 示例中的 URL 从https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_sample_basic_embed.htm更改为以下 URL 时,为什么我的代码会中断? https://public.tableau.com/profile/david.walls2745#!/vizhome/OlderWorkers_15998328862500/Dashboard1
IE。 这有效:
```
<!DOCTYPE html>
<html>
<head>
<title>Basic Embed</title>
<script type="text/javascript"
src="https://public.tableau.com/javascripts/api/tableau-2.min.js"></script>
<script type="text/javascript">
function initViz(){var containerDiv = document.getElementById("vizContainer"),
url = "http://public.tableau.com/views/RegionalSampleWorkbook/Storms",
options = {hideTabs: true, onFirstInteractive: function(){console.log("Run this code when the
viz has finished loading."); } }; var viz = new tableau.Viz(containerDiv, url, options);}
</script>
</head>
<body onload="initViz();">
<div id="vizContainer" style="width:800px; height:700px;"></div>
</body>
</html>
```
而这不会:
```
<!DOCTYPE html>
<html>
<head>
<title>Basic Embed</title>
<script type="text/javascript"
src="https://public.tableau.com/javascripts/api/tableau-2.min.js"></script>
<script type="text/javascript">
function initViz() {var containerDiv = document.getElementById("vizContainer"),
url ="https://public.tableau.com/profile/david.walls2745#!/vizhome/OlderWorkers_15998328862500/Dashboard1",
options = { hideTabs: true, onFirstInteractive:function(){console.log("Run this code when
the viz has finished loading."); } };var viz = new tableau.Viz(containerDiv, url, options);}
</script>
</head>
<body onload="initViz();">
<div id="vizContainer" style="width:800px; height:700px;"></div>
</body>
</html>
```
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.