asp问题..在线等
......................
.........................
上面是查询语句
if rs.eof and rs.bof then
response.write("?????????")
end if
.................................
.........................................
<td height="50" id="mycheck" colspan="2" align="center" valign="middle" style="padding-left:50px; display:none"> </td>
红色部分我这样写的 <script>document.all('mycheck').style.display=''; </script>
为什么当数据库里没数据的时候还是显示不出这个td来呢
————————————————————————————————————
源文件
——————————————————————————————————————
<!--#include file="../inc/conn.asp"-->
<%
if request.form.count>0 then
login_email=trim(request.Form("login_email"))
login_pwd=trim(request.Form("login_pwd"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from user_news where user_email='"&login_email&"' and user_pwd='"&login_pwd&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Write(" <script>document.all('mycheck').style.display=''; </script>")
rs.close
end if
end if
%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员登陆 </title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #000000;
}
body {
margin-left: 0px;
margin-top: 20px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="../inc/my.css" rel="stylesheet" type="text/css" />
</head>
<script language="javascript">
function go_url(){
{
parent.location.href="../reg/index.asp";
self.parent.pop.closeWindow();
}
}
function check_login(){
if(document.form1.login_email.value==""){
document.all("mycheck").style.display="";
document.form1.login_email.focus();
return false;
}
if(document.form1.login_pwd.value==""){
document.all("mycheck").style.display="";
document.form1.login_pwd.focus();
return false;
}
}
</script>
<body>
<!--#include file="../inc/top.asp"-->
<table width="960" style="border:#C6C6C6 solid 1px;" align="center" cellpadding="0" cellspacing="2">
<tr>
<td width="466" height="400" valign="middle"> <table width="96%" align="center" cellpadding="0" cellspacing="2" style="border:#C6C6C6 solid 1px;">
<form id="form1" name="form1" method="post" action="" onsubmit="return check_login()" >
<tr>
<td height="80" colspan="2" valign="top" style="padding-left:30px; padding-top:10px;"> <img src="../my_img/login.gif" width="281" height="42" /> </td>
</tr>
<tr>
<td width="26%" height="50" align="right" valign="middle" class="font16">Email: </td>
<td width="74%" align="left" valign="middle"> <input name=login_email class="input1" onfocus="this.className='input1-bor'" onblur="this.className='input1';" size="20" maxlength=40 /> </td>
</tr>
<tr>
<td width="26%" height="50" align="right" valign="middle" class="font16">密 码: </td>
<td width="74%" align="left" valign="middle"> <input name=login_pwd type="password" class="input1" onfocus="this.className='input1-bor'" onblur="this.className='input1';" size="20" maxlength=40 /> </td>
</tr>
<tr>
<td height="50" id="mycheck" colspan="2" align="center" valign="middle" style="padding-left:50px; display:none"> <div style="height:50px; width:200px; border: #f09 solid 1px; border-style:dotted;" id="div3" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" align="center" class="font14">Email或密码错误 </td>
</tr>
</table>
</div> </td>
</tr>
<tr>
<td height="50" colspan="2" align="center">
<INPUT name="提交" type=submit class="buttonL_2 font14 pink weight700" value="登 陆"> <INPUT name="按钮" type=button class="buttonL_2 font14 pink weight700" onclick="go_url()" value="注 册"> </td>
</tr>
<tr>
<td height="50" colspan="2" align="center" class="font12"> <a href="#" class="thirdWhite">我忘记了密码 </a> </td>
</tr>
</form>
</table> </td>
<td width="488"> </td>
</tr>
</table>
<!--#include file="../inc/foot.asp"-->
</body>
</html>