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];