日期:2014-05-17  浏览次数:20653 次

在HTML里面加入留言板后有时不能点到输入框?求大侠帮忙
本人小白,刚刚开始学做网站,在HTML页面里调用一个最简单的留言板,但显示时经常有的输入点击不了,求大侠们给点提点吧>_>,新手没什么分,大家帮我下忙啊。
代码如下:<table width="600" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
  <td align="left" valign="top"><script language="javascript">
String.prototype.Trim = function()
{
  return this.replace(/(^\s*)|(\s*$)/g, "");
}
function isEmail(strEmail) {
  if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
  return true;
  else
  return false;
}
</script>
  <style type="text/css">
body{margin:0;}
td,p {font-size: 12px;}
form{margin:0;}
a{
color:#000;
font-size:12px;
text-decoration: none;
}
a:hover {
text-decoration: underline;
color: #F00;
}

TEXTAREA {
FONT-SIZE: 12px;
BORDER: #000 1px solid;
}
INPUT {
FONT-SIZE: 12px;
BORDER: #000 1px solid;
}
.con{padding:10px;line-height:22px;word-break:break-all;word-wrap:break-word;}
</style>
  <script language="javascript">
function ChkBook(obj)
{
if(obj.UserName.value.Trim()=="")
{
alert("请输入用户名!");
obj.UserName.focus();
return false;
}
if(obj.EMail.value.Trim()=="")
{
alert("请输入电子邮件!");
obj.EMail.focus();
return false;
}
if(!isEmail(obj.EMail.value.Trim()))
{
alert("您输入的电子邮件不正确!");
obj.EMail.focus();
return false;
}
if(obj.Title.value.Trim()=="")
{
alert("请输入留言标题!");
obj.Title.focus();
return false;
}
if(obj.Content.value.Trim()=="")
{
alert("请输入留言内容!");
obj.Content.focus();
return false;
}
}
</script>
  <table align="center" width="95%" cellpadding="0" cellspacing="1" border="1" bgcolor="#F0F0F0" style="margin-top:10px;">
  <form action="index-book.asp" method="post" onSubmit="return ChkBook(this);">
  <input type="hidden" name="Action" value="SaveAdd">
  <tr bgcolor="#FFFFFF">
  <td height="22" align="center" colspan="2"><a href="contact-us.html" style="color:#FF0000; text-decoration:underline">在线留言</a></td>
  </tr>
  <tr bgcolor="#FFFFFF">
  <td height="25" width="25%" align="center">姓 <font color="#FFFFFF">
NAM</font>名:</td>
  <td width="75%"> 
  <input type="text" name="UserName" style="width:200px;" maxlength="20"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
  <td height="25" width="25%" align="center">联系方式:</td>
  <td>