Javascript 显示为空白的简单jqPlot

Javascript 显示为空白的简单jqPlot,javascript,jquery,html,jqplot,Javascript,Jquery,Html,Jqplot,出于某种原因,标题将移动以为图形腾出空间,看起来上面有一个图形,但图形本身并未显示。我不知道为什么会这样,jqplot网站说这个例子不需要插件 <!doctype html> <html> <head> <title>PJQuery Chart</title> <script type = "text/javascript" src = "javascripts/jquery-1.11.2.min.js"> <

出于某种原因,标题将移动以为图形腾出空间,看起来上面有一个图形,但图形本身并未显示。我不知道为什么会这样,jqplot网站说这个例子不需要插件

<!doctype html>
<html>
<head>

<title>PJQuery Chart</title>


<script type = "text/javascript" src = "javascripts/jquery-1.11.2.min.js"> 
<script type="text/javascript" src="jqplot/jqplot/src/plugins/jqplot.canvasTextRenderer.min.js"></script>                                                                                                                        
</script>
<script type="text/javascript" src="jqplot/jqplot/src/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
<script type = "text/javascript">

$(document).ready(function(){

var plot1 = $.jqplot ("chart1", [[3,7,9,1,4,6,8,2,5]]);
});

</script>

</head>

<body>
<div id = "chart1"style = "margin-top:20px; margin-left:20px; width:300px;          
height:300px;"></div>

<h1>This is a Heading</h1>

<p>This is a paragraph.</p>

</body>
</html>
我查了你的密码

您尚未包括jqPlot JS主文件-jquery.jqPlot.min.JS或jquery.jqPlot.JS

此外,您在结束标记时也犯了一些错误。第一个标记没有结束标记

确保标记的src路径正确,并且文件存在

对我来说,这很有效

<!doctype html>
<html>
<head>

<title>PJQuery Chart</title>

<script type = "text/javascript" src = "dist/jquery.min.js"></script>
<script type="text/javascript" src="dist/jquery.jqplot.min.js"></script><!--You have not included this file-->
<script type="text/javascript" src="dist/plugins/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="dist/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>

<script type = "text/javascript">

//Code..
$(document).ready(function(){
    var plot1 = $.jqplot ("chart1", [[3,7,9,1,4,6,8,2,5]]);
});

</script>

</head>

<body>
    <div id="chart1" style="margin-top:20px; margin-left:20px; width:300px; height:300px;"></div>

    <h1>This is a Heading</h1>
    <p>This is a paragraph.</p>
</body>
</html>
另外,请确保首先包含jquery.jqplot.min.js,然后是插件文件或任何其他jqplot文件


希望有帮助。

意识到我忘记了,但在添加此插件后没有任何变化。在您的示例中,您没有包含jqPlot插件,是否有任何错误?jqplot网站说这个特定的例子不需要插件,但它说的是jqplot插件,你仍然需要包括jqplot插件才能工作我在插件中添加了如下内容:如网站上所述,但他们根本没有帮助。我问是因为我在你的例子中没有看到它,你能用你正在测试的代码准确地更新你的例子吗?在导入中添加,格式变得奇怪,但我认为它可读吗?