莫名奇妙出现上下滚动条和左右滚动条

yds198298 2009-06-23 04:38:05
在母版页文件代码中,我为“注册”按钮添加onclientclick事件代码如下:

<asp:Button ID="Button2" runat="server" Text="注册" Width="41px" OnClientClick="openReg();"/>

openReg()方法如下:
function openReg()
{
var someValue=window.showModalDialog("Reg.aspx","","dialogWidth=635px;dialogHeight=440px;status=no;help=no;scrollbars=no");
}
在内容页文件Reg.aspx中,table的宽度和高度分别设为633和438 table表的背景图片尺寸为宽630,高435。在表中我还专门
设定了background-repeat:no-repeat属性,可是点"注册"按纽打开注册页面之后,
莫名奇妙出现了上下滚动条和左右滚动条。我看不出来代码问题出在哪?请教各位高手,谁能帮我解决?在线急待!!!

附"注册"页面代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Reg.aspx.cs" Inherits="Reg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>

</head>
<body>
<form id="form1" runat="server">
<table width="633" border="0" cellpadding="0" cellspacing="0"
style="background-image:url('images/bg1.jpg'); height: 438px;background-repeat:no-repeat">
<tr>
<td>
姓名<asp:TextBox ID="TextBox1" runat="server" Width="90px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ErrorMessage="姓名不能为空" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>

</td>
<td>
年龄<asp:TextBox ID="TextBox2" runat="server" Width="90px"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" runat="server"
ErrorMessage="年龄必须介于18到60之间" ControlToValidate="TextBox2"></asp:RangeValidator>
</td>
</tr>
<tr>
<td>
性别<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
Width="90px">
<asp:ListItem Selected="True" Value="0">男</asp:ListItem>
<asp:ListItem Value="1">女</asp:ListItem>
</asp:DropDownList>
</td>
<td>
电话<asp:TextBox ID="TextBox3" runat="server" Width="90px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
婚否<asp:DropDownList ID="DropDownList3" runat="server" Width="90px">
<asp:ListItem Value="0">已婚</asp:ListItem>
<asp:ListItem Value="1">未婚</asp:ListItem>
</asp:DropDownList>
</td>
<td>
籍贯<asp:DropDownList ID="DropDownList4" runat="server">
</asp:DropDownList>

<asp:DropDownList ID="DropDownList5" runat="server">
</asp:DropDownList>

</td>
</tr>
<tr>
<td>
身份证<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</td>
<td>
政治面貌<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2" align="center">
备注<asp:TextBox ID="TextBox5" runat="server" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button1" runat="server" Text="提交" />
 
 
<asp:Button ID="Button2" runat="server" Text="重置" />
</td>
</tr>
</table>
</form>
</body>
</html>
...全文
224 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
cyhcyhhychyc 2009-06-27
  • 打赏
  • 举报
回复
overflow:hidden;
liangzzzzzzz 2009-06-27
  • 打赏
  • 举报
回复
错字,XHTML
liangzzzzzzz 2009-06-27
  • 打赏
  • 举报
回复
真不想看下去...说实话没怎么用table...只能帮顶...

多嘴说一句,兄弟学学XHML和CSS吧
yds198298 2009-06-27
  • 打赏
  • 举报
回复
还有人回帖吗?
yds198298 2009-06-23
  • 打赏
  • 举报
回复
等了这么久 却是这么个让人失望的答案! 失望!!
vip__888 2009-06-23
  • 打赏
  • 举报
回复
table 的宽度应该用百分比 这样就不会出现了
athena12356 2009-06-23
  • 打赏
  • 举报
回复
会不会是你排版的时候有问题~本人是菜鸟一只啊~

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧