在1024X768下正常,在高点的分辨率下添加删除按钮就改变位置了,找不到原因~~代码如下
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<BODY>
<FORM name="thisform" method="post">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="42"> </td>
<td width="59"><table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="images/cg_11.jpg" <%=((pagenum==1)?"disabled":"")%>>
<a href="#" class="w5" style="cursor:hand" onclick="page_onclick(-1,<%=pagenum%>); return false;" >
首页
</a>
</td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table></td>
<td width="71"><table width="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="images/cg_11.jpg"><a href="#" class="w5" onClick="page_onclick(0,<%=pagenum%>); return false;" <%=((pagenum!=1)?"":"disabled")%>>上一页</a></td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table></td>
<td width="65"><table width="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="images/cg_11.jpg"><a href="#" class="w5" style="cursor:hand" onclick="page_onclick(1,<%=pagenum%>); return false;" <%=((pagenum<maxpage)?"":"disabled")%>>下一页</a></td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table></td>
<td width="61">
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5">
<img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" />
</td>
<td align="center" background="images/cg_11.jpg"><a href="#" class="w5" style="cursor:hand" onclick="page_onclick(2,<%=pagenum%>); return false;" <%=((pagenum==maxpage)?"disabled":"")%>>尾页</a></td>
<td width="5">
<img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" />
</td>
</tr>
</table>
</td>
<td width="100" class="w2">跳转到<input type="hidden" name="pagenum">
<input type="text" name="jumPage" id="jumPage" value="" size="3" style="width:20px;"/>
页
</td>
<td width="55">
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="<%=path%>/newimg/cg_11.jpg" onclick="listAdd(); return false;"" id="jumpIngPage">
<font class="w5" style="cursor:hand" >确定</font></td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table>
</td>
<td width="309" class="w2">
<font color="">第</font>
<font color="">
<%=pagenum %>
</font>
<font color="">页/共</font>
<font color="">
<%=maxpage %>
</font>
<font color="">页</font>
</td>
<td width="90"> </td>
<td <%=buttonDisplay %> width="81">
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5">
<img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" />
</td>
<td align="center" id="endPage" background="<%=path%>/newimg/cg_11.jpg">
<font class="w5" style="cursor:hand" onClick="new_onclick()">添加</font></td>
<td width="5">
<img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" />
</td>
</tr>
</table>
</td>
<td width="81" <%=buttonDisplay %>>
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5">
<img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" />
</td>
<td align="center" id="endPage" background="<%=path%>/newimg/cg_11.jpg" >
<font class="w5" style="cursor:hand" onClick="delete_onClick()" >删除</font></td>
<td width="5">
<img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</FORM>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<BODY>
<FORM name="thisform" method="post">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="42"> </td>
<td width="59"><table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="images/cg_11.jpg" <%=((pagenum==1)?"disabled":"")%>>
<a href="#" class="w5" style="cursor:hand" onclick="page_onclick(-1,<%=pagenum%>); return false;" >
首页
</a>
</td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table></td>
<td width="71"><table width="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="images/cg_11.jpg"><a href="#" class="w5" onClick="page_onclick(0,<%=pagenum%>); return false;" <%=((pagenum!=1)?"":"disabled")%>>上一页</a></td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table></td>
<td width="65"><table width="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="images/cg_11.jpg"><a href="#" class="w5" style="cursor:hand" onclick="page_onclick(1,<%=pagenum%>); return false;" <%=((pagenum<maxpage)?"":"disabled")%>>下一页</a></td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table></td>
<td width="61">
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5">
<img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" />
</td>
<td align="center" background="images/cg_11.jpg"><a href="#" class="w5" style="cursor:hand" onclick="page_onclick(2,<%=pagenum%>); return false;" <%=((pagenum==maxpage)?"disabled":"")%>>尾页</a></td>
<td width="5">
<img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" />
</td>
</tr>
</table>
</td>
<td width="100" class="w2">跳转到<input type="hidden" name="pagenum">
<input type="text" name="jumPage" id="jumPage" value="" size="3" style="width:20px;"/>
页
</td>
<td width="55">
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"><img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" /></td>
<td align="center" background="<%=path%>/newimg/cg_11.jpg" onclick="listAdd(); return false;"" id="jumpIngPage">
<font class="w5" style="cursor:hand" >确定</font></td>
<td width="5"><img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" /></td>
</tr>
</table>
</td>
<td width="309" class="w2">
<font color="">第</font>
<font color="">
<%=pagenum %>
</font>
<font color="">页/共</font>
<font color="">
<%=maxpage %>
</font>
<font color="">页</font>
</td>
<td width="90"> </td>
<td <%=buttonDisplay %> width="81">
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5">
<img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" />
</td>
<td align="center" id="endPage" background="<%=path%>/newimg/cg_11.jpg">
<font class="w5" style="cursor:hand" onClick="new_onclick()">添加</font></td>
<td width="5">
<img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" />
</td>
</tr>
</table>
</td>
<td width="81" <%=buttonDisplay %>>
<table width="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5">
<img src="<%=path%>/newimg/cg_10.jpg" width="5" height="21" alt="" />
</td>
<td align="center" id="endPage" background="<%=path%>/newimg/cg_11.jpg" >
<font class="w5" style="cursor:hand" onClick="delete_onClick()" >删除</font></td>
<td width="5">
<img src="<%=path%>/newimg/cg_13.jpg" width="5" height="21" alt="" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</FORM>
</html>
在设置你的button 在表格的位置 这样 不管你的分表率怎么调或 换显示器大小位置都不会变 因为你设置的相对位置
<style type="text/css">
<!--
body {
margin-left: 10px;
margin-top: 13px;
margin-right: 15px;
margin-bottom: 10px;
}
-->
</style>这是设置 你的table 相对屏幕 上 下左右的 位置 然后 你在调节button 在 表格里的位置被