posts - 165, comments - 198, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

jsp页面 模块化 (top+left+center)格式

Posted on 2007-09-14 17:46 G_G 阅读(2216) 评论(3)  编辑  收藏 所属分类: HTML
本人特留使用 ( ^_^ 写html 不多 呵呵 )
    本页问题说明: 在第一次加载这3个页面的javascript可正常使用
                   后 ajax修改的( innerHTML= )页面 javascript就使用不了全页的document而是修改后的document
                   有人可以帮帮忙吗?
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
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>My JSP 'Layout.jsp' starting page</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">
    
<SCRIPT src="http://127.0.0.1:7000/jspLayout/js/ajax.js"></SCRIPT>
    
<!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    
-->
  
</head>
  
  
<body>
           
<%@include file="../html/top.jsp"%>
           
<table width="90%">
               
<tr>
                   
<td  valign="top" align="center" height="80%">
                       
<jsp:include flush="true"  page="../html/left.html"/>
                   
</td>
                   
<td id="cen" valign="middle" align="center" width="80%" height="80%">
                       
<jsp:include flush="true"  page="../html/center.html"/>
                   
</td>
               
</tr>
           
</table>
  
</body>
</html>


评论

# re: jsp页面 模块化 (top+left+center)格式  回复  更多评论   

2007-09-17 22:47 by Tiger F
document对象是动态的,如果你对页面进行了修改,那就一定会反映到document对象中的,所以你不能通过它再得到修改前的某些内容的。

另外,既然指定了base,实在不该再出现src="http://127.0.0.1:7000/... 这样的代码呀。

# re: jsp页面 模块化 (top+left+center)格式  回复  更多评论   

2007-09-18 14:04 by G_G
谢谢
提醒

# re: jsp页面 模块化 (top+left+center)格式  回复  更多评论   

2007-10-12 10:14 by G_G
javascript 定义到 一个js中
后 几个jsp 共用 这个 js

只有注册用户登录后才能发表评论。


网站导航: