日期:2014-05-18 浏览次数:20782 次
JSONObject jo=JSONObject.fromObject(resultMap);out.print(jo.toString());
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Highcharts Example</title>
<!-- 1. Add these JavaScript inclusions in the head of your page -->
<script type="text/javascript" src="<%=basePath %>/js/jquery.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="<%=basePath %>/js/highcharts.js" charset="UTF-8"></script>
<!--[if IE]>
<script type="text/javascript" src="../js/excanvas.compiled.js"></script>
<![endif]-->
<script type="text/javascript">
$(function(){
$.post("../findJsonArea.action","",function(data){
var dataObj = eval('('+data+')');
$('#area').empty();
$('#type').empty();
$('#area').append("<option value='0'>-----请选择-----</option>");
$('#type').append("<option value='0'>-----请选择-----</option>");
//alert(dataObj['areas'][0]['areaName']);
$.each(dataObj['areas'],function(key,value){
$('#area').append('<option value="'+value['areaId']+'">'+value['areaName']+'</option>');
});
$.each(dataObj['type'],function(key,value){
$('#type').append('<option value="'+value['videoTypeId']+'">'+value['typeName']+'</option>');
});
});