iframe.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0011)about:blank -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR></HEAD>
<BODY>
<table>
<tr>
<td>
<iframe name="main" width="50" height="150" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" noresize src="../portal/portalinform.jsp?width=50&height=150"></iframe>
<!--这里的width 和height 都是作为参数传入到myjsp.jsp页面 -->
</td></tr>
</table>
</BODY></HTML>myjsp.jsp<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="com.fabu.InformUtil"%>
<%@ page import="com.fabu.Inform"%>
<%
InformUtil util = new InformUtil();
util.setPageSize(100); //最大滚动条目假设不超过100
util.setCurrentPage(1);
//设定返回页面的信息
ArrayList list = util.getAllInfoListByPage();
//移动区域高度
int intHeight = ParamUtils.getIntParameter(request,"height",130);
//移动区域宽度
int intWidth = ParamUtils.getIntParameter(request,"width",200);
//显示颜色
String color = ParamUtils.getParameter(request, "color", "696969");
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style>a{TEXT-DECORATION:none}</style>
<style>
#asd td { border-bottom: 0px dotted #cecece;line-height:25px;}
</style>
</head>
<table cellpadding="0" csllspacing="0" align="left" width="<%=intWidth%>" border="0" id="asd">
<tr>
<td valign="left">
<%
Inform info = null;
int count =0;
for(int i=0; i<list.size(); i++){
info = (Inform)list.get(i);%>
<a href='<%=info.getUrl()%>' target=_blank>
<font color='blue' size=2><%=title1%></font>
</a><br>
<%}%>
</td>
</tr>
</table>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0011)about:blank -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR></HEAD>
<BODY>
<table>
<tr>
<td>
<iframe name="main" width="50" height="150" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" noresize src="../portal/portalinform.jsp?width=50&height=150"></iframe>
<!--这里的width 和height 都是作为参数传入到myjsp.jsp页面 -->
</td></tr>
</table>
</BODY></HTML>myjsp.jsp<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="com.fabu.InformUtil"%>
<%@ page import="com.fabu.Inform"%>
<%
InformUtil util = new InformUtil();
util.setPageSize(100); //最大滚动条目假设不超过100
util.setCurrentPage(1);
//设定返回页面的信息
ArrayList list = util.getAllInfoListByPage();
//移动区域高度
int intHeight = ParamUtils.getIntParameter(request,"height",130);
//移动区域宽度
int intWidth = ParamUtils.getIntParameter(request,"width",200);
//显示颜色
String color = ParamUtils.getParameter(request, "color", "696969");
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style>a{TEXT-DECORATION:none}</style>
<style>
#asd td { border-bottom: 0px dotted #cecece;line-height:25px;}
</style>
</head>
<table cellpadding="0" csllspacing="0" align="left" width="<%=intWidth%>" border="0" id="asd">
<tr>
<td valign="left">
<%
Inform info = null;
int count =0;
for(int i=0; i<list.size(); i++){
info = (Inform)list.get(i);%>
<a href='<%=info.getUrl()%>' target=_blank>
<font color='blue' size=2><%=title1%></font>
</a><br>
<%}%>
</td>
</tr>
</table>
解决方案 »
- 用netbeans直新拉swing组件
- 在linux下运行jar文件
- 一个简单问题
- 关于定义自己异常的几个不解,菜鸟的问题,绝对不难!!!
- 怎么去掉(int 或 double不能是字符数组)数组中的重复元素?
- 实际项目中有没有用到过JSF的
- ``````怎样新建一个 方法 !!???`````
- 网络编程
- dynku(随风来去.cn)进来本人学JAVA以来第二个程序,计算器,问题多多,希望各位细心指点。
- 用java怎样修改操作系统的时间,我的操作系统是win2000?
- 高分求助,解决问题马上结贴,,Iframe 嵌入jsp页面,并且从iframe传高和宽参数,要此jsp页面不能有滚动条,但要显示最多条数,不管多长标题,换行数不能超过2行,请高人帮忙。。。
- java 1.5 内容中的class.cast的理解
这个页面是别的公司的,另外引入的类是外部包,大概形式是这样的,
只想大家给个思路或者解决方法。谢谢,如果分不够可以再加分。
iframe.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0011)about:blank -->
<HTML> <HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR> </HEAD>
<BODY>
<table>
<tr>
<td>
<iframe name="main" width="50" height="150" frameborder="0" marginwidth="0" marginheight="0" noresize src="../portal/portalinform.jsp?width=50&height=150"> </iframe>
<!--这里的width 和height 都是作为参数传入到myjsp.jsp页面 -->
</td> </tr>
</table>
</BODY> </HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0011)about:blank -->
<HTML> <HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR> </HEAD>
<BODY>
<table>
<tr>
<td>
<iframe name="main" width="50" height="150" frameborder="0" marginwidth="0" marginheight="0" noresize src="myjsp.jsp?width=50&height=150"> </iframe>
<!--这里的width 和height 都是作为参数传入到myjsp.jsp页面 -->
</td> </tr>
</table>
</BODY> </HTML> myjsp.jsp <%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="com.fabu.InformUtil"%>
<%@ page import="com.fabu.ParamUtils"%>
<%@ page import="com.fabu.Inform"%>
<%
InformUtil util = new InformUtil();
util.setPageSize(100); //最大滚动条目假设不超过100
util.setCurrentPage(1);
//设定返回页面的信息
ArrayList list = util.getAllInfoListByPage();
//移动区域高度
int intHeight = ParamUtils.getIntParameter(request,"height",130);
//移动区域宽度
int intWidth = ParamUtils.getIntParameter(request,"width",200);
//显示颜色
String color = ParamUtils.getParameter(request, "color", "696969");
%> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title> </title>
<style>a{TEXT-DECORATION:none} </style>
<style>
#asd td { border-bottom: 0px dotted #cecece;line-height:25px;}
</style>
</head>
<table cellpadding="0" csllspacing="0" align="left" width=" <%=intWidth%>" border="0" id="asd">
<tr>
<td valign="left">
<%
Inform info = null;
int count =0;
for(int i=0; i <list.size(); i++){
info = (Inform)list.get(i);%>
<a href=' <%=info.getUrl()%>' target=_blank>
<font color='blue' size=2> <%=title1%> </font>
</a> <br>
<%}%>
</td>
</tr>
</table>
String allTitle=title1;
int allTitleLength=allTitle.length()*13;
int sigleHang =0;
if(allTitleLength>intWidth){
sigleHang =2;
}else{ sigleHang =1;}
hangshu+=sigleHang ;
int width=intWidth/20;
if(info.getTitle().length()>width){title1=info.getTitle().substring(0,width)+"...";}else
title1= info.getTitle();楼主你看看。