js获取后台json数据显示在jsp页面元素

jsp id

<font size=2 >Today:</font> <font id ="todaytotal" size=2 color="red"></font>

 

js赋值

$.getJSON("/portal/visitor/getVisitorCount?rn="+Math.random(),function(jsondata){
	document.getElementById("todaytotal").innerText=jsondata[0].total[29];

 

posted @ 2016-10-28 10:11  wujixing909  阅读(8508)  评论(2编辑  收藏  举报