莫名奇妙出现上下滚动条和左右滚动条
在母版页文件代码中,我为“注册”按钮添加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>