*************************
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@page import="com.cqu.computer.*"%>
<%@page import="com.cqu.bean.*"%>
<%@page import="java.lang.*"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<html>
<head>
<title>久久名片</title>
<style>
#D1 {
BACKGROUND-COLOR:#FFFFFF;
BORDER-LEFT:'border-left-width' 'border-left-style' 'border-left-color';
BORDER-RIGHT:'border-right-width' 'border-right-style' 'border-right-color';
BORDER-TOP:'border-top-width' 'border-top-style' 'border-top-color';
LEFT:-211px;
background-image: url(images/onlineC.jpg);
background-repeat:no-repeat;
POSITION: absolute;
TOP: 56px;
VISIBILITY: visible;
WIDTH:232px;
overflow: visible;
height: 283px;
background-image: url(images/onlineC.jpg);
}
.style1 {
color: #FF0033;
font-weight: bold;
}
</style><script language="javascript">
function menuIn() {
if(n4) {
clearTimeout(out_ID)//取消该ID的定时一次性运行功能
if( menu.left > menuW*-1+20+10 ) {
menu.left -= 8
in_ID = setTimeout("menuIn()", 1)//让某个函数在设定时间后运行
}
else if( menu.left > menuW*-1+20 ) {
menu.left--
in_ID = setTimeout("menuIn()", 1)
}
}
else {
clearTimeout(out_ID)
if( menu.pixelLeft > menuW*-1+20+10 ) {
menu.pixelLeft -= 4
in_ID = setTimeout("menuIn()", 1)
}
else if( menu.pixelLeft > menuW*-1+20 ) {
menu.pixelLeft--
in_ID = setTimeout("menuIn()", 1)
}
}
}
function menuOut() {
if(n4) {
clearTimeout(in_ID)
if( menu.left < -10) {
menu.left += 4
out_ID = setTimeout("menuOut()", 1)
}
else if( menu.left < 0) {
menu.left++
out_ID = setTimeout("menuOut()", 1)
} }
else {
clearTimeout(in_ID)
if( menu.pixelLeft < -10) {
menu.pixelLeft += 2
out_ID = setTimeout("menuOut()", 1)
}
else if( menu.pixelLeft < 0 ) {
menu.pixelLeft++
out_ID = setTimeout("menuOut()", 1)
}
}
}
function fireOver() {
clearTimeout(F_out)
F_over = setTimeout("menuOut()", 10)
}
function fireOut() {
clearTimeout(F_over)
F_out = setTimeout("menuIn()", 10)
}
function init() {
if(n4) {
menu = document.D1
menuW = menu.document.width
menu.left = menuW*-1+20 //初始化的时候菜单隐藏,只露20像素出来
document.D1.onmouseover = menuOut
document.D1.onmouseout = menuIn
menu.visibility = "visible"
}
else if(e4) {
menu = D1.style
menuW = D1.offsetWidth
D1.style.pixelLeft = menuW*-1+20 //初始化的时候菜单隐藏,只露20像素出来
D1.onmouseover = fireOver
D1.onmouseout = fireOut D1.style.visibility = "visible"
}
}
F_over=F_out=in_ID=out_ID=null
n4 = (document.layers)?1:0//判断是否netscape
e4 = (document.all)?1:0;//判断是否IE以前document.layers指的是Netscape浏览器,document.all指的是IE 浏览器
//现在的话,Netscape6.0高级版本也支持document.all啦function initAd() {
document.all.D1.style.posTop = -200;
//设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.D1.style.visibility = 'visible'//设置层为可见
MoveLayer('D1');//调用函数MoveLayer()
}
function MoveLayer(layerName) {
var x = 30;//浮动广告层固定于浏览器的x方向位置
var y = 60 ;//浮动广告层固定于浏览器的y方向位置
var diff = (document.body.scrollTop + y - document.all.D1.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
//eval("document.all." + layerName + ".style.posLeft = x");//移动广告层
setTimeout("MoveLayer('D1');", 10);//设置20毫秒后再调用函数MoveLayer()
}</script>
</head><body onLoad="init(); initAd();">
<div id="D1" class="drag" style="D1">
<table height="284" border="0">
<tr align="center">
<td width="18" height="73" align="center"> </td>
<td width="188" align="center"> </td>
<td align="center">
</td>
</tr>
<tr align="center">
<td align="center"> </td> <td align="center">
<div align="center"> <%
String sql = "select top 5 qqNikName,qqNum from T_ManagerList order by ID";
ResultSet rsShow = DbAction.DoSelect(sql); while(rsShow.next()){
%> <font size="+3"><strong><font size="2" face="Courier New, Courier, mono"><p><a href="http://wpa.qq.com/msgrd?V=1&Uin=<%=rsShow.getString("qqNum")%>&Site=久久名片&Menu=yes" target="_blank"><%=rsShow.getString("qqNikName")%></a></p>
<p>
<%
}
%>
</p>
</font></strong></font>
</div>
</td> <td height="185" align="center" width="13"> </td>
</tr>
<tr align="center">
<td height="18" align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
</table>
</div>
<!-- MainTop.jsp -->
<iframe name ="topFrame" scrolling="NO" frameborder=0 src="MainTop.jsp" style="position:absolute; top:0px; left:80px; border:0;width:850px; height:343px; z-index:-1; filter='progidDXImageTransform.Microsoft.Alpha(style0,opacity0)';"></iframe>
<!-- MainBotton.jsp -->
<iframe hspace="0" vspace="0" name ="BottonFrame" scrolling="no" frameborder=0 src="MainBotton.jsp" style="position:absolute; top:339px; left:80px; border:0;width:850px; height:800px; z-index:-1; filter='progidDXImageTransform.Microsoft.Alpha(style0,opacity0)';"></iframe>
<!-- P_DownFrame.jsp--><iframe name ="DownFrame" frameborder=0 scrolling="no"src="P_DownFrame.jsp" style="position:absolute; top:1130px; left:80px;width:850px; height:110px; z-index:-1; filter='progidDXImageTransform.Microsoft.Alpha(style0,opacity0)';"></iframe>
</body>
</html>
****************************************
上面这段代码,浮动广告在用jB9调试的时候能正常浮动。可是,直接把war文件发布到tomcat4.1下的时候,就不能浮动了。请教高手,这是为什么?
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@page import="com.cqu.computer.*"%>
<%@page import="com.cqu.bean.*"%>
<%@page import="java.lang.*"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<html>
<head>
<title>久久名片</title>
<style>
#D1 {
BACKGROUND-COLOR:#FFFFFF;
BORDER-LEFT:'border-left-width' 'border-left-style' 'border-left-color';
BORDER-RIGHT:'border-right-width' 'border-right-style' 'border-right-color';
BORDER-TOP:'border-top-width' 'border-top-style' 'border-top-color';
LEFT:-211px;
background-image: url(images/onlineC.jpg);
background-repeat:no-repeat;
POSITION: absolute;
TOP: 56px;
VISIBILITY: visible;
WIDTH:232px;
overflow: visible;
height: 283px;
background-image: url(images/onlineC.jpg);
}
.style1 {
color: #FF0033;
font-weight: bold;
}
</style><script language="javascript">
function menuIn() {
if(n4) {
clearTimeout(out_ID)//取消该ID的定时一次性运行功能
if( menu.left > menuW*-1+20+10 ) {
menu.left -= 8
in_ID = setTimeout("menuIn()", 1)//让某个函数在设定时间后运行
}
else if( menu.left > menuW*-1+20 ) {
menu.left--
in_ID = setTimeout("menuIn()", 1)
}
}
else {
clearTimeout(out_ID)
if( menu.pixelLeft > menuW*-1+20+10 ) {
menu.pixelLeft -= 4
in_ID = setTimeout("menuIn()", 1)
}
else if( menu.pixelLeft > menuW*-1+20 ) {
menu.pixelLeft--
in_ID = setTimeout("menuIn()", 1)
}
}
}
function menuOut() {
if(n4) {
clearTimeout(in_ID)
if( menu.left < -10) {
menu.left += 4
out_ID = setTimeout("menuOut()", 1)
}
else if( menu.left < 0) {
menu.left++
out_ID = setTimeout("menuOut()", 1)
} }
else {
clearTimeout(in_ID)
if( menu.pixelLeft < -10) {
menu.pixelLeft += 2
out_ID = setTimeout("menuOut()", 1)
}
else if( menu.pixelLeft < 0 ) {
menu.pixelLeft++
out_ID = setTimeout("menuOut()", 1)
}
}
}
function fireOver() {
clearTimeout(F_out)
F_over = setTimeout("menuOut()", 10)
}
function fireOut() {
clearTimeout(F_over)
F_out = setTimeout("menuIn()", 10)
}
function init() {
if(n4) {
menu = document.D1
menuW = menu.document.width
menu.left = menuW*-1+20 //初始化的时候菜单隐藏,只露20像素出来
document.D1.onmouseover = menuOut
document.D1.onmouseout = menuIn
menu.visibility = "visible"
}
else if(e4) {
menu = D1.style
menuW = D1.offsetWidth
D1.style.pixelLeft = menuW*-1+20 //初始化的时候菜单隐藏,只露20像素出来
D1.onmouseover = fireOver
D1.onmouseout = fireOut D1.style.visibility = "visible"
}
}
F_over=F_out=in_ID=out_ID=null
n4 = (document.layers)?1:0//判断是否netscape
e4 = (document.all)?1:0;//判断是否IE以前document.layers指的是Netscape浏览器,document.all指的是IE 浏览器
//现在的话,Netscape6.0高级版本也支持document.all啦function initAd() {
document.all.D1.style.posTop = -200;
//设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.D1.style.visibility = 'visible'//设置层为可见
MoveLayer('D1');//调用函数MoveLayer()
}
function MoveLayer(layerName) {
var x = 30;//浮动广告层固定于浏览器的x方向位置
var y = 60 ;//浮动广告层固定于浏览器的y方向位置
var diff = (document.body.scrollTop + y - document.all.D1.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
//eval("document.all." + layerName + ".style.posLeft = x");//移动广告层
setTimeout("MoveLayer('D1');", 10);//设置20毫秒后再调用函数MoveLayer()
}</script>
</head><body onLoad="init(); initAd();">
<div id="D1" class="drag" style="D1">
<table height="284" border="0">
<tr align="center">
<td width="18" height="73" align="center"> </td>
<td width="188" align="center"> </td>
<td align="center">
</td>
</tr>
<tr align="center">
<td align="center"> </td> <td align="center">
<div align="center"> <%
String sql = "select top 5 qqNikName,qqNum from T_ManagerList order by ID";
ResultSet rsShow = DbAction.DoSelect(sql); while(rsShow.next()){
%> <font size="+3"><strong><font size="2" face="Courier New, Courier, mono"><p><a href="http://wpa.qq.com/msgrd?V=1&Uin=<%=rsShow.getString("qqNum")%>&Site=久久名片&Menu=yes" target="_blank"><%=rsShow.getString("qqNikName")%></a></p>
<p>
<%
}
%>
</p>
</font></strong></font>
</div>
</td> <td height="185" align="center" width="13"> </td>
</tr>
<tr align="center">
<td height="18" align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
</table>
</div>
<!-- MainTop.jsp -->
<iframe name ="topFrame" scrolling="NO" frameborder=0 src="MainTop.jsp" style="position:absolute; top:0px; left:80px; border:0;width:850px; height:343px; z-index:-1; filter='progidDXImageTransform.Microsoft.Alpha(style0,opacity0)';"></iframe>
<!-- MainBotton.jsp -->
<iframe hspace="0" vspace="0" name ="BottonFrame" scrolling="no" frameborder=0 src="MainBotton.jsp" style="position:absolute; top:339px; left:80px; border:0;width:850px; height:800px; z-index:-1; filter='progidDXImageTransform.Microsoft.Alpha(style0,opacity0)';"></iframe>
<!-- P_DownFrame.jsp--><iframe name ="DownFrame" frameborder=0 scrolling="no"src="P_DownFrame.jsp" style="position:absolute; top:1130px; left:80px;width:850px; height:110px; z-index:-1; filter='progidDXImageTransform.Microsoft.Alpha(style0,opacity0)';"></iframe>
</body>
</html>
****************************************
上面这段代码,浮动广告在用jB9调试的时候能正常浮动。可是,直接把war文件发布到tomcat4.1下的时候,就不能浮动了。请教高手,这是为什么?
解决方案 »
- 启动apache-tomcat-5.5.33出现问题
- Quartz Cron表达式
- 第一个EJB 异常Need to specify class name in environment。。。
- 页面导航框架???
- 求购一个文件上传实例!!
- 求教牛人,关于JMF使用APPLET接受RTP数据流!!!
- 后台生成的Excel如何在Struts中直接下载?
- 记录点击数是用数据库好还是用文本文件好?
- 觉得值得研究的问题!绝对给高分!十万火急啊。
- 如何远程监控一台机器的目录?
- 怎样用JAVASRIPT 删除一个对象,比如 <img><div>
- 可以在控制台(console)中看到输出,在页面上却看不到,郁闷!!!
另外javascript属于客气端的东西。
其实我很不喜欢WAR,打成WAR后,TOMCAT还是会给你解压出来