我原来的html文件只是头部的样式表和正文中的一些标题和链接。就是这个......
<html>
<head>
<center><title>Heat Flux Through Different Roofing Systems</title></center>
<link rel="stylesheet" type="text/css" href="style.css"/>
<head>
<style type="text/css">
</style>
</head>
</head>
<center><h1><U>Heat Flux Through Different Roofing systems</U></h1></center>
<center><h2><U>Interactive Data</U></h2></center>
<p3>
<a href="http://eebhub.org" class="information" id="eebhub" target="blank" style="position: absolute;top:0px;left:0px;"><span></span></a>
<a href="http://www.princeton.edu/main/" class="information" id="princeton university" target="blank" style="position: absolute;top:0px;left:30px;"><span></span></a>
<a href="http://energy.gov/" class="information" id="department of energy" target="blank" style="position: absolute;top:0px;left:60px;"><span></span></a>
</p3>
</body>
</html>
我的第二个文件看起来像这样(这是图表)......
<script src="../vendor/d3.min.js"></script>
<script src="../vendor/d3.layout.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="../rickshaw.js"></script>
</head>
<body>
<div id="chart_container">
<div id="chart"></div>
</div>
<script>
var ajaxGraph = new Rickshaw.Graph.Ajax( {
element: document.getElementById("chart"),
width: 400,
height: 200,
renderer: 'line',
dataURL: 'data.json',
onData: function(d) { d[0].data[0].y = 80; return d },
series: [
{
name: 'New York',
color: '#c05020',
},
{
name: 'London',
color: '#30c020',
},
{
name: 'Tokyo',
color: '#6060c0'
}
]
} );
</script>
</body>
</html>
当我将其打开为自己的html文件时,图表看起来是正确的,但我希望它位于文本下方的其他窗口中。为了实现这一点,我如何将这两个代码放在一起?