https://passport.58.com/login类这样的登陆框,空白时候提示。有木有像这样好看点的

解决方案 »

  1.   


    <html>
    <head>
        <title>Test</title>
        <meta http-equiv="content-Type" content="text/html;charset=gb2312" />
        <script type="text/javascript">
        </script>
    </head>
    <body>
        <input id="test11" type="text" style="margin-left: 100px; float: left; margin-top: 100px" id="key"
            name="key" value="请输入关键字" onfocus="if(value==defaultValue){value='请输入关键字';this.style.color='#999999'}"
            onblur="if(!value){value=defaultValue;this.style.color='#999999'}" onclick="this.value=''" />
    </body>
    </html>
    不知道是不是楼主需要的
      

  2.   

    样式自己调整一下,功能可以实现<HTML>
    <HEAD>
    <TITLE><%=homepage_title%>--管理中心-用户登陆</TITLE>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script language="JavaScript">
    <!--
    function window_onload() {
    document.mail.username.focus();
    }
    function cancel()
    {
    mail.reset();
    document.getElementById("txtHint").innerHTML="";
    }function IsValid()
    {
    if (document.mail.username.value=="")
    {
    document.getElementById("txtHint").innerHTML="用户名不能为空";
    document.mail.username.focus();
    return false;
    }
    if (document.mail.password.value=="")
    {
    document.getElementById("txtHint").innerHTML="密码不能为空";
    document.mail.password.focus();
    return false;
    }

    }
    //-->
    </script><style type="text/css">
    <!--
    .STYLE1 {font-size: 12px}-->
    </style>
    </HEAD><BODY  topMargin=0 leftmargin="0" onLoad="return window_onload()">
    <p>&nbsp;</p>
      <form name=mail action="ckecklogin.asp" onSubmit="return IsValid();" method=post>
     <table width=234 border=1 align="center" cellpadding=0 cellspacing=0 bgcolor="#5BD2E8">
              <tbody> 
              <tr>
                <td height="37" colspan="2" align="center" style="line-height:180%"                                ><span id="txtHint" class="STYLE1"></span></td>
                </tr>
              <tr> 
                <td width="66" height="28" style="line-height:180%"> <span class="STYLE1">帐&nbsp;&nbsp;号:</span> </td>
                <td width="162" style="line-height:180%"><input type="text" name="username" size="20" class="button1"></td>
              </tr>
              <tr> 
                <td height="28" class="STYLE1" style="line-height:180%"> 密&nbsp;&nbsp;码:              </td>
                <td height="28" style="line-height:180%"><input type="password" name="password" size="20" class="button1"></td>
              </tr>
              <tr>
                <td height="28" colspan="2" align="center" style="line-height:180%"> 
                  <input type="submit" name="Submit" value="提交" id="Submit">
                  <label for="label"></label>
                    
                  <input type="button" name="Submit2" value="重置" id="label" onClick=" cancel()"></td>
              </tr>
              </tbody> 
        </table>
      </form>
    </BODY>
    </HTML>