废话不多说,直接上源码:
select.jsp
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
nofollow" >
My JSP 'select.jsp' starting page
<<a href="/tag/Meta/" target="_blank" class="keywords">Meta</a> http-equiv="pragma" content="no-cache">
<<a href="/tag/Meta/" target="_blank" class="keywords">Meta</a> http-equiv="cache-control" content="no-cache">
<<a href="/tag/Meta/" target="_blank" class="keywords">Meta</a> http-equiv="expires" content="0">
<<a href="/tag/Meta/" target="_blank" class="keywords">Meta</a> http-equiv="keywords" content="keyword1,keyword2,keyword3">
<<a href="/tag/Meta/" target="_blank" class="keywords">Meta</a> http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css" rel="external nofollow" >
-->
<script type="text/javascript" src="js/jquery-2.1.1.min.js" charset="utf-8"></script>
<script type="text/javascript">
function get_app_type() {
$.ajax({
type: "post",url: "AppTypeShow.action",//<a href="/tag/huoqu/" target="_blank" class="keywords">获取</a>json数据
dataType: "json",success: function(data) {
var d = eval("(" + data + ")");
for(var i = 0; i < d.length; i++) {
var id = d[i].id;
var name = d[i].name;
var opt = "";
$("#appType").append(opt);
}
},error: function() {
alert("系统异常,请稍后再试!")
}
});
}
function get_app_class() {
$.ajax({
type: "post",url: "AppClassShow.action",dataType: "json",success: function(data) {
var d = eval("(" + data + ")");
for(var i = 0; i < d.length; i++) {
var id = d[i].id;
var name = d[i].name;
var opt = "";
$("#appClass").append(opt);
}
},error: function() {
alert("系统异常,请稍后再试!")
}
});
}
$(document).ready(function() {
get_app_type();
get_app_class();
});
</script>