|

楼主 |
发表于 2025-4-24 17:22:19
|
显示全部楼层
河南省新乡市
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head> <title> 全国空气质量排名</title><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><meta name='description' content='全国空气质量实时排名' /><meta name='keywords' content='全国空气质量排名,全国空气质量指数排名' /><link href='css/main.css' type='text/css' rel='stylesheet' /><link href='css/mainaqi.css' type='text/css' rel='stylesheet' /><script language='JavaScript' src='js/jquery.min.js' type='text/javascript'></script> <script language='JavaScript' src='js/highcharts.js' type='text/javascript'></script> </head><body> <div class='wrap'> <div class='layout'> <div class='content'> <div class='aqi-site' style='height:100px; border:0; padding-top:10px;'> <div style=' float:left;'><a href='/' ><img src='images/logo.jpg' border=0 /></a></div> <div style=' float:right;'><a href='/' ><img src='images/dingbu.jpg' border=0 /></a></div> </div> <div id='tqNav'> <ul> <li><a href='/' >首页</a></li> <li><a href='/paiming.htm' class='navHv'>实时排名</a></li> </ul> </div> <script type='text/javascript'> Highcharts.visualize = function (table, options) { // the categories options.xAxis.categories = []; $('tbody th', table).each(function (i) { options.xAxis.categories.push(this.innerHTML); }); // the data series options.series = []; $('tr', table).each(function (i) { var tr = this; $('th, td', tr).each(function (j) { if (j > 0) { // skip first column //var labelvalue=this.innerHTML; //alert(labelvalue); if (i == 0) { // get the name and init the series options.series[j - 1] = { name: this.innerHTML, data: [], dataLabels: { enabled: true, rotation: 0, color: '#000000', align: 'center', x: -1, y: -6, formatter: function () { return this.innerHTML; } } }; } else { if ((j - 1) == 1) { options.series[j - 1].data.push({ 'color': '#4572a7', 'y': parseFloat(this.innerHTML) }); } if ((j - 1) == 0) { if (isNaN(parseFloat(this.innerHTML))) { options.series[j - 1].data.push({ 'color': '#00E400', 'y': '' }); } if (parseFloat(this.innerHTML) >= 0 && parseFloat(this.innerHTML) <= 50) { options.series[j - 1].data.push({ 'color': '#00E400', 'y': parseFloat(this.innerHTML) }); options.series[j - 1].dataLabels.enabled = 'true'; options.series[j - 1].dataLabels.formatter = function () { if (this.y == 0 || this.innerHTML == 'NA') { return 'NA'; } else { return this.y; } }; } if (parseFloat(this.innerHTML) >= 51 && parseFloat(this.innerHTML) <= 100) { options.series[j - 1].data.push({ 'color': '#FFFF00', 'y': parseFloat(this.innerHTML) }); options.series[j - 1].dataLabels.enabled = 'true'; options.series[j - 1].dataLabels.formatter = function () { if (this.y == 0) { return 'NA'; } else { return this.y; } }; } if (parseFloat(this.innerHTML) >= 101 && parseFloat(this.innerHTML) <= 150) { options.series[j - 1].data.push({ 'color': '#FF7E00', 'y': parseFloat(this.innerHTML) }); options.series[j - 1].dataLabels.enabled = 'true'; options.series[j - 1].dataLabels.formatter = function () { if (this.y == 0) { return 'NA'; } else { return this.y; } }; } if (parseFloat(this.innerHTML) >= 151 && parseFloat(this.innerHTML) <= 200) { options.series[j - 1].data.push({ 'color': '#FF0000', 'y': parseFloat(this.innerHTML) }); options.series[j - 1].dataLabels.enabled = 'true'; options.series[j - 1].dataLabels.formatter = function () { if (this.y == 0) { return 'NA'; } else { return this.y; } }; } if (parseFloat(this.innerHTML) >= 201 && parseFloat(this.innerHTML) <= 300) { options.series[j - 1].data.push({ 'color': '#99004C', 'y': parseFloat(this.innerHTML) }); options.series[j - 1].dataLabels.enabled = 'true'; options.series[j - 1].dataLabels.formatter = function () { if (this.y == 0) { return 'NA'; } else { return this.y; } }; } if (parseFloat(this.innerHTML) > 300) { options.series[j - 1].data.push({ 'color': '#7E0023', 'y': parseFloat(this.innerHTML) }); options.series[j - 1].dataLabels.enabled = 'true'; options.series[j - 1].dataLabels.formatter = function () { if (this.y == 0) { return 'NA'; } else { return this.y; } }; } } } } }); }); var chart = new Highcharts.Chart(options); Highcharts.setOptions({ colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'] }); } // On document ready, call visualize on the datatable. $(document).ready(function () { var table = document.getElementById('datatable'), options = { plotOptions: { column: { pointWidth: 20 ////设置柱子宽度 } }, chart: { renderTo: 'container', defaultSeriesType: 'column' }, exporting: { enabled: false //用来设置是否显示'打印','导出'等功能按钮,不设置时默认为显示 }, title: { text: '', style: { fontSize: '19px' }, align: 'center' }, colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'], xAxis: { labels: { y: 20 } }, yAxis: { align: 'right', title: { text: '' } }, legend: { enabled: false } }; Highcharts.visualize(table, options); }); //---------------------------------------------- $(document).ready(function () { var table = document.getElementById('datatable1'), options = { plotOptions: { column: { pointWidth: 20 ////设置柱子宽度 } }, chart: { renderTo: 'container1', defaultSeriesType: 'column' }, exporting: { enabled: false //用来设置是否显示'打印','导出'等功能按钮,不设置时默认为显示 }, title: { text: '', style: { fontSize: '19px' }, align: 'center' }, colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'], xAxis: { labels: { y: 20 } }, yAxis: { align: 'right', title: { text: '' } }, legend: { enabled: false } }; Highcharts.visualize(table, options); }); </script> <!--空气质量今日和明日预报--> <div class='aqi-zhishu'> <!--过去 24小时指数--> <div class='aqi-good'> <div class='zstitle'>空气质量最好前十名</div> <div id='container' style='margin:auto; width:460px; height:280px;'></div> <table id='datatable' style='display:none'> <thead> <tr> <th>AQI指数:</th> <th>空气质量指数(AQI)</th> </tr> </thead> <tbody> <tr><th>韶关市</th><td>15</td></tr><tr><th>南平市</th><td>17</td></tr><tr><th>三亚市</th><td>19</td></tr><tr><th>汕尾市</th><td>19</td></tr><tr><th>贵港市</th><td>21</td></tr><tr><th>贺州市</th><td>21</td></tr><tr><th>深圳市</th><td>21</td></tr><tr><th>郴州市</th><td>21</td></tr><tr><th>河池市</th><td>22</td></tr><tr><th>黔东南.</th><td>22</td></tr> </tbody> </table> </div> <!--过去7天指数--> <div class='aqi-bad'> <div class='zstitle'>空气质量最差前十名</div> <div id='container1' style='margin:auto; width:460px;height:280px; '></div> <table id='datatable1' style='display:none'> <thead> <tr> <th>AQI指数:</th> <th>空气质量指数(AQI)</th> </tr> </thead> <tbody> <tr><th>吉林市</th><td>158</td></tr><tr><th>四平市</th><td>157</td></tr><tr><th>长春市</th><td>131</td></tr><tr><th>铁岭市</th><td>118</td></tr><tr><th>通辽市</th><td>112</td></tr><tr><th>阜新市</th><td>109</td></tr><tr><th>和田地.</th><td>109</td></tr><tr><th>无锡市</th><td>105</td></tr><tr><th>荆门市</th><td>104</td></tr><tr><th>十堰市</th><td>98</td></tr> </tbody> </table> </div> </div> <script type='text/javascript'> function ChangShow(selectid) { if (selectid == 'selectdengji1') { ShowTableTr('badtable', 4, selectdengji1.value); sheng1.selectedIndex = 0; } if (selectid == 'sheng1') { ShowTableTr('badtable', 2, sheng1.value); selectdengji1.selectedIndex = 0; } if (selectid == 'selectdengji2') { ShowTableTr('goodtable', 4, selectdengji2.value); sheng2.selectedIndex = 0; } if (selectid == 'sheng2') { ShowTableTr('goodtable', 2, sheng2.value); selectdengji2.selectedIndex = 0; } } function ShowTableTr(tableid, lie, zhi) { var tableObj = document.getElementById(tableid); for (var i = 0; i < tableObj.rows.length; i++) { //遍历Table的所有Row if (i != 0) { if (zhi == '0') { tableObj.rows[i].style.display = ''; } if (zhi != '0' && tableObj.rows[i].cells[lie].innerText == zhi) { tableObj.rows[i].style.display = ''; } if (zhi != '0' && tableObj.rows[i].cells[lie].innerText != zhi) { tableObj.rows[i].style.display = 'none'; } } } } function show(showid) { if (showid == 'cn') { document.getElementById('usa').className = 'nom'; document.getElementById('cn').className = 'currtitle'; document.getElementById('xiang1').style.display = ''; document.getElementById('xiang2').style.display = 'none'; CreateChart(1); } else { document.getElementById('usa').className = 'currtitle'; document.getElementById('cn').className = 'nom'; document.getElementById('xiang1').style.display = 'none'; document.getElementById('xiang2').style.display = ''; CreateChart(2); } } </script> <div class='weilai' style=' margin:auto; width:960px;'><div style=' margin:auto; width:960px; text-align:center;font-size:14px; font-weight:bold; margin:10px; margin-top:50px;'>全国空气质量实时排名</div><div style=' margin:auto; width:960px; text-align:center;font-size:12px; margin:10px; margin-top:10px;'>更新:2025-04-24 16:00</div> <table id='goodtable'> <thead ><tr style='background:#ebeff7;'><th width='16%' >排名</th><th width='16%' >城市</th><th width='20%' > <select onchange='ChangShow('sheng2');' name='sheng3' id='sheng2'> <option value='0'>所有省份</option> <option value='安徽省'>安徽省</option><option value='北京市'>北京市</option><option value='重庆市'>重庆市</option><option value='福建省'>福建省</option><option value='甘肃省'>甘肃省</option><option value='广东省'>广东省</option><option value='广西省'>广西省</option><option value='贵州省'>贵州省</option><option value='海南省'>海南省</option><option value='河北省'>河北省</option><option value='河南省'>河南省</option><option value='黑龙江省'>黑龙江省</option><option value='湖北省'>湖北省</option><option value='湖南省'>湖南省</option><option value='吉林省'>吉林省</option><option value='江苏省'>江苏省</option><option value='江西省'>江西省</option><option value='辽宁省'>辽宁省</option><option value='内蒙古'>内蒙古</option><option value='宁夏'>宁夏</option><option value='青海省'>青海省</option><option value='山东省'>山东省</option><option value='山西省'>山西省</option><option value='陕西省'>陕西省</option><option value='上海市'>上海市</option><option value='四川省'>四川省</option><option value='天津市'>天津市</option><option value='西藏'>西藏</option><option value='新疆'>新疆</option><option value='云南省'>云南省</option><option value='浙江省'>浙江省</option> </select></th><th width='16%' >AQI</th><th width='16%' ><select onchange='ChangShow('selectdengji2');' name='selectAge0' id='selectdengji2'> <option value='0'>所有等级</option> <option value='严重污染'>严重污染</option> <option value='重度污染'>重度污染</option> <option value='中度污染'>中度污染</option> <option value='轻度污染'>轻度污染</option> <option value='良'>良</option> <option value='优'>优</option> </select></th> <th width='16%' >PM2.5浓度</th> </tr></thead> <tr > |
|