怎么使用ajax,对页面中的javascript控件实时修改
如何使用ajax,对页面中的javascript控件实时修改?
菜鸟一只,有地方说的不对的请见谅,希望多多指导。
要做一个表格控件 实时显示数据库的数据 简单如下图:(使用jqplot)
这一段展现的是一个javascript代码,对一个DIV进行了修改
菜鸟一只,有地方说的不对的请见谅,希望多多指导。
要做一个表格控件 实时显示数据库的数据 简单如下图:(使用jqplot)
这一段展现的是一个javascript代码,对一个DIV进行了修改
<h1>表格展示</h1>
<script class="code" type="text/javascript">
$(document).ready(function(){
var s1 = [200, 600, 700, 1000];
var s2 = [460, -210, 690, 820];
var s3 = [-260, -440, 320, 200];
// Can specify a custom tick Array.
// Ticks should match up one for each y value (category) in the series.
var ticks = ['May', 'June', 'July', 'August'];
var plot1 = $.jqplot('chart', [s1, s2, s3], {
// The "seriesDefaults" option is an options object that will
// be applied to all series in the chart.
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {fillToZero: true}
},
// Custom labels for the series are specified with the "label"
// option on the series option. Here a series option object
// is specified for each series.
series:[
{label:'Hotel'},
{label:'Event Regristration'},
{label:'Airfare'}
],
// Show the legend and put it outside the grid, but inside the
// plot container, shrinking the grid to accomodate the legend.
// A value of "outside" would not shrink the grid and allow