⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 news_index.asp

📁 我的小网站个人利用业余时间设计的
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="refresh.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<link rel=stylesheet type=text/css href=../css/style.css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>微生物学查询</title>
<STYLE type=text/css>
<!--
a:hover {  font-size: 13px; color: #ff0000; text-decoration: none}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="434" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>            
          <td width="600" height="80" valign="top">
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>                
                <td>
				<%

sql="select * from news where type='相关资料' order by newsid desc"
set rs=createobject("adodb.recordset")
rs.Open sql,conn,3,2
if rs.BOF then
	response.Write "未检索到新闻记录"
else
 page=CLng(request("txtpage"))
  rs.PageSize=5
  if page<1 then page=1
  if page>rs.PageCount then  page=rs.PageCount
   rs.AbsolutePage=page
  
%>
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                   
					 <form Action="news_index.asp"  Method="GET" align="right" name="form1">
                    <tr height="25" class="l200"> 
                      <td>                        <div align="left"> <%=rs.PageSize%>条/页&nbsp&nbsp当前页:<font color=#FF0000><%=page%></font>/<%=rs.PageCount%>页&nbsp&nbsp</div></td>
                    </tr>
					 </form>
					
                    <tr> 
                      <td valign="top">
					  
					        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <%
for ipage=1 to rs.PageSize 
    newsTitle=replace(rs("title")," ","")
	if len(newsTitle)>30 then
	    newsTitle=left(newsTitle,29)&"..."
	  end if
    newsRq=split(replace(rs("date"),"/","-"),"-")
	  newsYear=newsRq(0)
	  newsMonth=newsRq(1)
	  newsDay=newsRq(2)
	  if len(newsMonth)<2 then
	       newsMonth="0"&newsMonth
	   end if
	  if len(newsDay)<2 then
	       newsDay="0"&newsDay
		end if
	   newsRq=newsYear&"-"&newsMonth&"-"&newsDay   
%>
                    <tr  onMouseOver="this.style.background='#f0f0f0'" onMouseOut="this.style.background='#ffffff'"> 
                      <td width="12" height="20" valign="middle"><font color="#006600">·</font></td>
                      <td  height="20" valign="middle" class="link2"><a href="#" onMouseDown="MM_openBrWindow('newscontent.asp?newsid=<%=rs("newsid")%>','','scrollbars=yes,width=720,height=500')" class="link2"><%=newsTitle%> 
                      </a></td>
                      <td width="75"  height="20" valign="middle" class="link2"><%=newsRq%></td>
                    </tr>
                    <%
	rs.movenext
	if  rs.eof  then
		Exit  for
	end if
next

end if
 rs.close
 set rs=nothing
 %>
                  </table></td>
                    </tr>
                 </table></td>
              </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -