当前位置: 代码迷 >> vbScript >> input非空检查解决方案
  详细解决方案

input非空检查解决方案

热度:1186   发布时间:2013-02-26 00:00:00.0
input非空检查
[code=VBScrip<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>悬赏科技</title>
<link href="css.css" rel="stylesheet" type="text/css">
 <script language="JavaScript">
function check()

if(document.yuanbao.arra.value == "" || document.yuanbao.arra.value == null)
{  
alert("用户名不能为空!");
document.yuanbao.arra.focus();
return false;
}
//return true
}
</script>
</head>

<body>

<!-- #include file="top1.asp"-->
<div id="mid">
  <div id="left">
<%
 
  if (request("xuanshang_id")<>"") then
   
xuanshang_id=request("xuanshang_id")
response.Write(bianji_id)
end if
strquery = "select * from shangjinkexuejia where cs_id='"&xuanshang_id&"' "
  set rsa = conn.execute(strquery)
if rsa.bof and rsa.eof then
response.Write"没有记录"
else
cs_biaoti=rsa("cs_biaoti")
cs_biaoti = Replace(cs_biaoti,"<", "&lt;")
  cs_biaoti = Replace(cs_biaoti,">", "&gt;")
 
yuanbao=rsa("cs_yuanbao")
 
 
zongfenlei=rsa("cs_zongfenlei")
zongfenlei = Replace(zongfenlei,"<", "&lt;")
  zongfenlei = Replace(zongfenlei,">", "&gt;")
 
cifenlei=rsa("cs_cifenlei")
 
 
email=rsa("cs_email")  
email = Replace(email,"<", "&lt;")
  email = Replace(email,">", "&gt;")
 
wenti=rsa("cs_wenti")  
wenti = Replace(wenti,"<", "&lt;")
  wenti = Replace(wenti,">", "&gt;")
 
nicheng=rsa("cs_nicheng")
nicheng = Replace(nicheng,"<", "&lt;")
  nicheng = Replace(nicheng,">", "&gt;")
 
 
%>
 
  <table border="1" width="100%" id="table1">
<tr>
<td align="left">标题</td>
<td align="left">悬赏元宝</td>
<td align="left">总分类</td>
<td align="left">次分类</td>
<td align="left">email</td>
</tr>
<tr>
<td align="left"> <%=cs_biaoti%></td>
<td align="left"> <%=yuanbao%></td>
<td align="left"> <%=zongfenlei%></td>
<td align="left"> <%=cifenlei%></td>
<td align="left"> <%=email%></td>
</tr>
</table>
 
 
 
 
 
<table width="100%" border="1">
  <tr>
  <td width="134"><img src=<%=rsa("cs_touxiang")%> width="80" height="80"><br><%=nicheng%> </td>
  <td width="658"><%=wenti%> </td>
  
  </tr>
  
  
  </table>

  <p\>
  相关解决方案