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