標籤:style color os io for 資料 ar art
<script>
$(document).ready(function () {
<%
string dqsj = System.DateTime.Now.ToString("yyyy-MM-dd");
%>
seach();
});
var shuju = "";
var sj = "";
function se()
{
seach();
}
function seach() {
$(function () {
var strTady = $("#txtCxsj").val();
$.ajax({
async: false,
type: "POST",
url: "/qbjl/dqwdxx?strTady=" + strTady,
dataType: ‘json‘,
success: function (data) {
shuju = data.rows;
sj = data.rows1;
}
});
$(‘#container‘).highcharts({
chart: {
zoomType: ‘xy‘,
plotBackgroundImage: ‘/Yxjc/xml/themebg.png‘,
backgroundColor: ‘#e9ecef‘
},
credits: {
enabled: false // 禁用著作權資訊
},
title: {
text: ‘大氣溫度資料展示‘
},
xAxis: [{
categories: eval(sj)
}],
yAxis: [
{ // Secondary yAxis
gridLineWidth: 0,
title: {
text: ‘大氣溫度‘,
style: {
color: Highcharts.getOptions().colors[0]
}
},
labels: {
format: ‘{value} ℃‘,
style: {
color: Highcharts.getOptions().colors[0]
}
}
}
],
tooltip: {
shared: true
},
legend: {
layout: ‘vertical‘,
align: ‘center‘,
x: 350,
verticalAlign: ‘top‘,
y: 15,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || ‘#FFFFFF‘
},
series: [{
name: ‘大氣溫度‘,
data: eval(shuju)
}]
});
});
}
function IsTady() {
strTady = $("#txtCxsj").val();
var strsj = new Date();
var strrq = strsj.format("yyyy-MM-dd");
if (strTady != "") {
if (strTady < strrq) {
$("#NextBtn").show();
}
else {
$("#NextBtn").hide();
}
}
}
function BackDay() {
strTady = $("#txtCxsj").val();
if (strTady != "") {
var day = new Date(Date.parse(strTady.replace(/-/g, ‘/‘)));
day.setDate(day.getDate() - 1);
$("#txtCxsj").val(day.format("yyyy-MM-dd"));
seach();
}
else {
alert("查詢日期不可為空");
}
}
function NextDay() {
strTady = $("#txtCxsj").val();
if (strTady != "") {
var day = new Date(Date.parse(strTady.replace(/-/g, ‘/‘)));
day.setDate(day.getDate() + 1);
$("#txtCxsj").val(day.format("yyyy-MM-dd"));
seach();
}
else {
alert("查詢日期不可為空");
}
}
Date.prototype.format = function (format) {
var o = {
"M+": this.getMonth() + 1,
"d+": this.getDate(),
"h+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.getSeconds(),
"q+": Math.floor((this.getMonth() + 3) / 3),
"S": this.getMilliseconds()
}
if (/(y+)/.test(format)) {
format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
}
for (var k in o) {
if (new RegExp("(" + k + ")").test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
}
}
return format;
}
</script>
<div class="box2" paneltitle="選擇指標噴灌機" id="searchPanel">
<form action="" id="queryForm" method="post">
<input type="hidden" id="parentId" name="parentId" value="1" />
<table cellpadding="0" cellspacing="0" width="100%" class="table">
<tr>
<td class="ti_blue" width="70" style="text-align: right">查詢日期:
</td>
<td width="150">
<input type="text" class="date" id="txtCxsj" datefmt="yyyy-MM-dd" name="gcjcxx.jcny" onpropertychange="IsTady()" value="<%=dqsj%>" />
</td>
<td class="ti_blue" width="220" style="text-align: left">
<button type="button" onclick="BackDay()"><span class="icon_find">上一天</span></button>
<button type="button" onclick="NextDay()" id="NextBtn" style="display: none"><span class="icon_find">下一天</span></button>
</td>
<td align="right" style="padding-right: 10px">
<button type="button" onclick="se()"><span class="icon_find">查詢</span></button>
</td>
</tr>
</table>
</form>
</div>
<div style="border:solid 1px #bcf5f5">
<div id="container" style="min-width:700px;height:400px;"></div>
</div>
<div style="height:0px; width:100%;"></div>