可以弹出多层,引用
<script type="text/javascript" src="<%=path %>/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="<%=path %>/js/jquery.jmpopups-0.5.1.js"></script>
时,只在主页引用即可,其他引用会出现一些问题
1、index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>jquery.jmpopups弹出层演示</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="<%=path %>/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="<%=path %>/js/jquery.jmpopups-0.5.1.js"></script>
<script type="text/javascript">
function closeWindow(title){
$.closePopupLayer(title);
}
function openWindow(windowUrl,windowName,windowSize) {
$.openPopupLayer({
name: windowName,
width: windowSize,
url: windowUrl
});
}
</script>
</head>
<body>
<a href="javascript:;" οnclick="openWindow('tan1.jsp','tan1','100')" >打开弹出层</a>
</body>
</html>
2、tan1.jsp
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>关闭弹出层</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<a href="javascript:;" οnclick="closeWindow('tan1')" >关闭弹出层</a>
</body>
</html>
3、关于插件开发,可以拷贝一个jquery.js,在最下面,引用你得js,css等代码
document.write("<link href='http:\/\/你ip\/webCoalition\/webCoalitionFront\/css\/wzlm.css' rel='stylesheet' type='text/css' />");
document.write("<script src='http:\/\/你ip\/webCoalition\/js\/jquery\/jquery.jmpopups-0.5.1.js'><\/script>");
document.write("<script src='http:\/\/你ip\/webCoalition\/js\/PlugInService\/selectNumber.js?'" + document.scripts.item(0).src.split('?')[1] +"><\/script>");
业务逻辑htm都可以写在js文件中,动态创建。