目前网页做成如下样子:问题1:左栏点击后结果显示在了左栏。我想做成想csdn论坛这种,无论左栏怎么点,总是在中间显示结果。
问题2:如图,左栏,我想做成单行长度过长就自动换行,而不是现在的显示不全这是mian.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>My JSP 'mian.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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
<div style="float: left;">
<iframe width="200px" height="800px" scrolling="no" frameborder="0" src="articleAction.action?method=smallListArticle"></iframe><!--跳转到left.jsp -->
</div>
<div align="center">
<!-- <iframe width="700px" height="1000px" scrolling="no" frameborder="0" src="wish/writeWish.jsp"></iframe> -->
<jsp:include page="../wish/writeWish.jsp"></jsp:include>
</div>
</body>
</html>我的left.jsp:<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
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 'left.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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
最新发表<br>
<ul>
<s:iterator value="listArticleVo" id="listVo">
<li style="list-style-type:none;"><a href="articleAction.action?method=findById&id=${articleId }">${title }</a></li>
<li style="list-style-type:none;">${preView }<a href="articleAction.action?method=findById&id=${articleId }">阅读全文</a></li>
</s:iterator>
</ul>
<a href="articleAction.action?method=listArticle">更多文章</a>
</div>
</html>
++++++++++++++++++++++++
希望天底下所有的程序员都身体健康发大财、、、、、呵呵
问题2:如图,左栏,我想做成单行长度过长就自动换行,而不是现在的显示不全这是mian.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>My JSP 'mian.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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
<div style="float: left;">
<iframe width="200px" height="800px" scrolling="no" frameborder="0" src="articleAction.action?method=smallListArticle"></iframe><!--跳转到left.jsp -->
</div>
<div align="center">
<!-- <iframe width="700px" height="1000px" scrolling="no" frameborder="0" src="wish/writeWish.jsp"></iframe> -->
<jsp:include page="../wish/writeWish.jsp"></jsp:include>
</div>
</body>
</html>我的left.jsp:<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
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 'left.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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head>
<body>
最新发表<br>
<ul>
<s:iterator value="listArticleVo" id="listVo">
<li style="list-style-type:none;"><a href="articleAction.action?method=findById&id=${articleId }">${title }</a></li>
<li style="list-style-type:none;">${preView }<a href="articleAction.action?method=findById&id=${articleId }">阅读全文</a></li>
</s:iterator>
</ul>
<a href="articleAction.action?method=listArticle">更多文章</a>
</div>
</html>
++++++++++++++++++++++++
希望天底下所有的程序员都身体健康发大财、、、、、呵呵
解决方案 »
- 同样一个方法在Tomcat里面正确,在weblogic里面报错 急需解决!!!!
- javaMail中文API文档(谁有,给一个中文的)
- jsp中查寻的问题
- 请问月新8k的java程序员的工作内容是什么??
- 菜菜鸟提问:关于时间类型转换问题
- 一个字符串转换问题!! 急!!!15分钟以内,谢各位
- 以下程序会报错,各位大虾帮帮忙,急急急!
- jsp用什么开发工具对硬件要求比较低
- 我有问题求助!!
- 问一下大家,MyBatis是做什么用的 现在的主流框架是不是还是SSH呢
- sevlet里面httpURLConnection了一个网址,怎么doGet重复执行了10次???
- tomcat java菜鸟求带,问些简单的问题和经验
2. 设置左栏的宽度和word-wrap方式 (CSS设置)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Title</title><style type="text/css">
#sidebar {
width: 200px;
float: left;
background: red;
overflow: hidden;
}#main {
width: 700px;
float: left;
}</style><script src="jquery.js"></script>
<script type="text/javascript">
$(function() {
$("#sidebar a").click(function() {
$("iframe#myFrame").load().attr("src", $(this).attr("href"));
return false;
});
});
</script>
</head><body>
<div id="sidebar">
<a href="http://www.apple.com">Apple</a><br>
<a href="http://www.baidu.com">BaiduBaiduBaiduBaidu BaiduBaiduBaidu</a><br>
<a href="http://www.google.com">Google</a><br>
</div>
<div id="main">
<iframe id="myFrame" width="100%" height="500px"></iframe>
</div>
</body>
</html>
是不是你没有引入jquery.js这个文件?