| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1145 人关注过本帖
标题:输入框 输入文字时不能居中怎么回事
取消只看楼主 加入收藏
a768841969
Rank: 2
等 级:论坛游民
帖 子:93
专家分:45
注 册:2011-3-31
结帖率:100%
收藏
已结贴  问题点数:10 回复次数:5 
输入框 输入文字时不能居中怎么回事
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Keywords" content="设计,施工,装修,装饰,装潢,婚庆,学车,买车,建材,婚纱,摄影,妇婴,家居,电器,家具,喜筵,婚礼!" />
<title>注册页面&nbsp;一生无忧台州建材团购网!</title>
<link href="css.css" rel="stylesheet" type="text/css"/>
<link href="css.css" rel="stylesheet" type="text/css">
<link type="text/css" rel="stylesheet" href="top.css"/>
<script type="text/javascript" src="/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/Js/top.js"></script>
<link rel="shortcut icon" href="小图标.jpg" type="images/x-icon" />
<!--#include file="top1.asp"-->
<style type="text/css">
a:link.bar{ color:#0000FF;}
</style>
<SCRIPT language="JavaScript">
function Check(){
if(document.getElementById("username").value==""){
  alert ("提示:\n\n请填写需要查询的用户名!");
  myform.username.focus();
  return false;
}
{        
var uName=document.myform.username.value;
window.open("regcheck.asp?username="+uName,"check","width=320,height=126,left=200,top=200");
}
}
</SCRIPT>
<script language = "JavaScript">
function check()
{
  if (document.myform.username.value=="")
  {
    alert("用户帐号不能为空!");
    document.myform.username.focus();
    return false;
  }
  if (document.myform.pass.value.length<6)
  {
    alert("密码长度不能少于六个字符!");
    document.myform.pass.focus();
    return false;
  }
  if( document.myform.pass.value != document.myform.pew_password.value)
  {
    alert("确认密码不正确!");
    document.myform.pew_password.focus();
    return false;
  }
  if (document.myform.truename.value=="")
  {
    alert("联系人不能为空!");
    document.myform.truename.focus();
    return false;
  }
  if (document.myform.lxtel.value=="")
  {
    alert("联系电话不能为空!");
    document.myform.lxtel.focus();
    return false;
  }
  if (document.myform.gsname.value=="")
  {
    alert("公司名称不能为空!");
    document.myform.gsname.focus();
    return false;
  }
  if (document.myform.specialty.value=="")
  {
    alert("请选择所属行业!");
    document.myform.specialty.focus();
    return false;
  }
  if (document.myform.address.value=="")
  {
    alert("公司地址不能为空!");
    document.myform.address.focus();
    return false;
  }
  if (document.myform.jianjie.value=="")
  {
    alert("公司简要介绍不能为空!");
    document.myform.jianjie.focus();
    return false;
  }
  if(document.myform.selname.checked==false){
    alert("你必须同意服务条款才能注册");
    return false;
  }
}
  function OnShow(){
 document.getElementById("textid").style.display="block";
}
</script>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" style="border:#d5d5d5 solid  1px;">
  <tbody>
   <!-- <tr>
      <td width="10"><img height="10"
                        src="images/tab03.gif"
                        width="10" /></td>
      <td
                      background="images/tab07.gif"></td>
      <td width="10"><img height="10"
                        src="images/tab04.gif"
                        width="10" /></td>
    </tr>-->
    <tr>
      <td valign="top"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="left" valign="top" bgcolor="#F5F5F7" style="border-left:#BABABA 1px solid"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="2">
          <form name="myform" id="myform" method="post" action="hy_save.asp" onSubmit="javascript:return check();">
            <tr>
              <td height="25" colspan="2"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
                <tr>
           <td width="25%" align="center" style="background:url(images/1灰.png) no-repeat 120px 0px;"><span style="padding-left:110px;">1、选择类型</span></td>
                  <td width="25%" align="center" style="background:url(images/2黄.png) no-repeat 52px 0px;"><font color="#FFFFFF">2、填写信息</font></td>
                  <td width="25%" align="center" style="background:url(images/3.png) no-repeat 0px 0px;"><span style="padding-right:110px;">3、完成注册</span></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="21" colspan="2">请认真、仔细地填写以下信息,严肃的商业信息有助于您获得别人的信任,结交潜在的商业伙伴,获取商业机会!</td>
            </tr>
            <tr>
              <td height="23" colspan="2" align="center" bgcolor="#FFCC66">用户注册信息</td>
            </tr>
            <tr>
              <td width="23%" height="23" align="center" bgcolor="#FEEFCE">填表日期&nbsp;&nbsp;</td>
              <td width="77%"><%=year(now)%>年<%=month(now)%>月<%=day(now)%>日 </td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">邮&nbsp;&nbsp;&nbsp; 箱&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><input name="username" type="text" id="username" style="height:20px;width:150px;" />
                      <span class="zhengchang">
                      <input type="button" name="Submit43" value="验证帐号是否存在" onclick="return Check();" />
                      <span class="red" style="color: #FF0000">(用来登录,最好使用QQ邮箱)
                      <input name="userqx" type="hidden" id="userqx" value="jc" />
                      </span></span></td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">用户密码&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><input name="pass" type="password" id="pass" style="height:20px;width:150px;" />
                <span class="red" style="color: #FF0000">(密码长度不能少于六个字符)</span></td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">确认密码&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><input name="pew_password" type="password" id="pew_password" style="height:20px;width:150px;" />
                <span class="red" style="color: #FF0000">(必填)</span></td>
            </tr>
            <tr>
              <td height="23" colspan="2" align="center" bgcolor="#FFCC66">姓名和联系方式</td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">联 系 人&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><input name="truename" type="text" id="truename" style="height:20px;width:150px;" />
                <span class="red" style="color: #FF0000">(必填)</span></td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">联系电话&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><input name="lxtel" type="text" id="lxtel" style="height:20px;width:150px;"/>
                <span class="red" style="color: #FF0000">(必填)</span></td>
            </tr>
            <tr>
              <td height="23" colspan="2" align="center" bgcolor="#FFCC66">公司名称和主营业务</td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">公司名称&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><input name="gsname" type="text" id="gsname"style="height:20px;width:220px;"  />
                <span class="red" style="color: #FF0000">(必填)</span></td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">所属行业&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><select name="specialty" id="specialty" style="height:20px;width:220px;" >
                              <option value="">--请选择--</option>
                          <%
                          set cp=server.CreateObject("adodb.recordset")
                          cp.open "select * from cp_aboutus_sort where findid like '%|1|%' and Sign=3",conn,1,1
                          if not cp.eof then
                          do while not cp.eof
                          %>
                          <option value="<%=cp("Aboutussort")%>" name="specialty" /><%=cp("Aboutussort")%></option>
                            <%
                            cp.movenext
                            loop
                            end if
                            cp.close
                            set cp=nothing
                            %>
                            </select>
                <span class="red" style="color: #FF0000">(必选)</span>              </td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">公司地址&nbsp;<font color="#FF0000" style="text-align:center">*</font></td>
              <td><input name="address" type="text" id="address" style="height:20px;width:220px;"  />
                <span class="red" style="color: #FF0000">(必填)</span></td>
            </tr>
            <tr>
              <td height="23" align="center" bgcolor="#FEEFCE">网&nbsp;&nbsp;&nbsp; 址&nbsp;&nbsp;</td>
              <td><input name="url" type="text" id="url" value="http://" style="height:20px;width:220px;" /></td>
            </tr>
            <tr>
              <td height="100" bgcolor="#FEEFCE"><div align="center">公司简介摘要&nbsp;<font color="#FF0000" style="text-align:center">*</font></div></td>
              <td><textarea name="jianjie" style="width:520px;" rows="6" id="jianjie"></textarea>
                <span class="red" style="color: #FF0000">(必填)</span></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td height="100" align="left"><input name="selname" id="selname" type="checkbox" value="同意" />我已经阅读并完全同意<a class="bar" href="javascript:;" onclick="OnShow()">服务条款</a></td>
                    </tr>
                    <tr><td></td><td height="20" align="left"><textarea name="textarea3"  rows="4" id="textid" readonly="readonly" style=" width:520px;display:none; font-size:12px;" >


</textarea></td></tr>
            <tr>
              <td height="23" colspan="2" align="center"><input type="submit" value="注册" name="button122" /></td>
            </tr>
            </form>
          </table></td>
        </tr>
      </table></td>
    </tr>
    <!--<tr>
      <td><img height="10"
                        src="images/tab06.gif"
                        width="10" /></td>
      <td
                      background="images/tab09.gif"></td>
      <td><img height="10"
                        src="images/tab05.gif"
                        width="10" /></td>
    </tr>-->
  </tbody>
</table>
我这个页面的输入框 在ie和火狐中显示的不一样的[local]1[/local] ie显示的是文字在顶端的 而火狐能正常显示,请问怎么让他们都能垂直居中显示
搜索更多相关主题的帖子: content 输入文字 注册页面 PUBLIC 团购网 
2011-06-13 11:37
a768841969
Rank: 2
等 级:论坛游民
帖 子:93
专家分:45
注 册:2011-3-31
收藏
得分:0 
恩 好了,这是怎么引起的??还有这句话是什么意思我在css手册中看不懂


[ 本帖最后由 a768841969 于 2011-6-13 13:19 编辑 ]
2011-06-13 13:16
a768841969
Rank: 2
等 级:论坛游民
帖 子:93
专家分:45
注 册:2011-3-31
收藏
得分:0 
但是为什么鼠标点文本框时  能看到鼠标向上移动的过程,怎么解决
2011-06-13 13:38
a768841969
Rank: 2
等 级:论坛游民
帖 子:93
专家分:45
注 册:2011-3-31
收藏
得分:0 
<table cellpadding="0" cellspacing="0" align="center" height="40">
<tr>
<td height="30">姓名:</td><td height="30"><input name="username" type="text" style="height:25px; line-height:30px;" /></td>
</tr>
</table>
这里加了line-height 也不行,鼠标会移动的
2011-06-13 17:00
a768841969
Rank: 2
等 级:论坛游民
帖 子:93
专家分:45
注 册:2011-3-31
收藏
得分:0 
  我这里margin-top:2px;怎么没反应呢
2011-06-14 08:20
a768841969
Rank: 2
等 级:论坛游民
帖 子:93
专家分:45
注 册:2011-3-31
收藏
得分:0 
哦明白了 谢谢
2011-06-14 10:02
快速回复:输入框 输入文字时不能居中怎么回事
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.032299 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved