要在 TabT 加入一个动态加载的页面 但是 content.jsp中的js 无法加载
var tab = $("#TabT").tabs('getSelected');
var num = tab.panel('options').attributes.TableNumber;
tab.panel({
href:'<%=basePath%>jsp/dataQuery/content.jsp?id='+pid+'&num='+num,
});
content.jsp的页面代码
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="view"%>
<view:checkLogon />
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
String id = request.getParameter("id");
String num = request.getParameter("num");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>图片加载页</title>
<script type="text/javascript" src="<%=basePath%>js/jQuery/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jQuery/jquery.cookie.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jqueryEasyUI/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jqueryEasyUI/easyui-lang-zh_CN.js"></script>
<link href="<%=basePath%>js/jqueryEasyUI/themes/gray/easyui.css" type="text/css" rel ="stylesheet">
<link href="<%=basePath%>css/cssreset-min.css" type="text/css" rel="stylesheet" />
<link href="<%=basePath%>css/style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<script type="text/javascript">
window.onload=function(){
var id=(“<%=id%>”);
var num=(“<%=num%>”);
alert("此处断查看是否拿到信息")
$.ajax({
url: '<%=basePath %>fdirms/downFtp',
type : 'post', //数据发送方式
data:{
'num' : num,
'id' : id
},
async : false,
success:function(data){
for(i=0;i<data.length;i++){
$("image").append("<dl style='margin-left:58.8333px'> <dt><img src='<%=basePath %>fdirms/showImage?id='"+data[i].ID +"'></dt><dd><a href=''>"+data[i].eFileName+"</a></dd></dl>" );
}
}
});
}
</script>
<div id="photo_box">
<div class="photo_list" id="image">
</div>
</div>
</body>
</html>
如果在div中直接写内容是可以抓取到的 但是动态加载 js是没法触发