效果图如上,但是我只完成了下面那个表格那块,上面的走势图弄不出来,我是分别Ajax来获取了(走势图和表格分开的);本来是想用一个文件来完成,但是失败了
下面放上文件:
主文件
<?php
require ('inc/config.php');
$page_title = '各区域住宅成交情况-feige数据中心';
include ('inc/header.php');
require (MYSQL);
?>
<p class="portlet wrap mT50">
<p class="portlet-title">各区域住宅成交情况</p>
<p class="portlet-body">
<form action="zhuzhai.php" method="post">
<p class="datePickerBlock">
区域
<select id="city" name="city" class="select-city">
<?php
$q = "SELECT city_id, city_name FROM f_city ORDER BY city_id ASC";
$r = mysqli_query ($conn, $q) or trigger_error("Query: $qn<br />MySQL Error: " . mysqli_error($conn));
if (@mysqli_num_rows($r) > 0) {
while ($row = mysqli_fetch_array ($r, MYSQLI_NUM)) {
echo "<option value="$row[0]">$row[1]</option>n";
}
mysqli_free_result ($r);
} else {
echo '<option>暂无区域,请添加一个新地区</option>';
}
mysqli_close($conn);
?>
</select>
自定义时间范围
<input id="start_time" name="start_time" class="hasDatePicker" onClick="WdatePicker()" type="text" size="16" value="" />至<input id="end_time" name="end_time" class="hasDatePicker" onClick="WdatePicker()" type="text" size="16" value="" />
<input class="btn" type="submit" id="submit" value="查询" />
</p>
</form>
<p id="container" style="min-width:800px;height:400px;margin:10px 0;"></p>
<table id="datatable" class="tableStyle">
<thead>
<tr>
<th></th>
<th>成交面积</th>
<th>成交套数(套)</th>
</tr>
</thead>
<tbody>
<tr>
<td>2014-08-15</td>
<td>222</td>
<td>16670</td>
</tr>
<tr>
<td>2014-08-16</td>
<td>7167.07</td>
<td>621</td>
</tr>
<tr>
<td>2014-08-17</td>
<td>71660.07</td>
<td>62</td>
</tr>
<tr>
<td>2014-08-18</td>
<td>21</td>
<td>716</td>
</tr>
</tbody>
</table>
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群