日期:2014-05-16 浏览次数:20829 次
<script type="text/javascript">
$(function(){
$(".jd").click(function(){
$.ajax({
type:"POST",
data:{"side":3},
url:"../police/inlist3.action",
dataType:"json",
success:function(data){
$("#c04").empty();
for(i=0;i<data.length;i++){
var $tr=$('<ul><li>' +data[i].side
+ '</li><li>' +data[i].title
+ '</li><li>' +'<s:date name="new java.sql.Date('
+ data[i].createTime
+')" format="yyyy-MM-dd"/></li></ul>'
);
document.getElementById("c04").innerHTML=$tr;
}
}
});
});
});
</script>
jsp:
<li><a href="#" class="jd">测试</a></li>
<div id="c04" class="hidden" style="float:left;"> </div>
<action name="inlist3" class="sdjx.action.ListInformationAction">
<result type="json" name="json">
</result>
</action>
JSONArray obj=JSONArray.fromObject(industrys);
return "json";