我试图让一个简单的例子jqplot去,但它不会显示,为什么不呢?
-
27-09-2019 - |
题
下面是该文件的全部内容:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>jqPlot Examples</title>
<!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="../jqtouch-1_0_b/jqtouch/jquery.1.3.2.min.js"></script>
<script language="javascript" type="text/javascript" src="../javascript/jquery.jqplot.min.js"></script>
<link rel="stylesheet" type="text/css" href="../javascript/jquery.jqplot.css" />
</head>
<body>
<h1>jqPlot Examples</h1>
<script id="source" language="javascript" type="text/javascript">
$.jqplot('chartdiv', [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]]);
</script>
div<br>
<div id="chartdiv" style="height:400px;width:300px; "></div>
div<br>
</body>
</html>
<html>
下面是我在FF看到,铬,IE:
jqPlot实例
DIV
DIV
我看到在我的Apache的错误日志中没有错误。我知道所有的.js文件是从HTML访问。有没有人有,为什么这可能无法正常工作的想法?
解决方案 2
得到了从 jqPlot留言板的我的答案。
在div
必须在调用给jqPlot
之前。我想这是有道理的,但我无法看到它。我的小白色表示....
其他提示
此位的代码替换您的绘图脚本看看。
<SCRIPT LANGUAGE="JavaScript">
$(function() { var plot1 = $.jqplot('chartdiv', [[[1,2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]]); })
</SCRIPT>
检查您的.js文件是在正确的位置。
使用下面的链接路径
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/jqplot/1.0.8/jquery.jqplot.min.css" />
不隶属于 StackOverflow