index_newnotice.asp

来自「基于ASP的教育网站」· ASP 代码 · 共 50 行

ASP
50
字号
<%
Dim RsNotice
Dim RsNotice_numRows

Set RsNotice = Server.CreateObject("ADODB.Recordset")
RsNotice.ActiveConnection = MM_connDB_STRING
RsNotice.Source = "SELECT * FROM tNotice"
RsNotice.CursorType = 0
RsNotice.CursorLocation = 2
RsNotice.LockType = 1
RsNotice.Open()

RsNotice_numRows = 0
%>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TR>
          <TD width="16"><IMG height=41  src="images/index1_1.gif" width=16></TD>
          <TD width="85" height="41" background=images/index1_2.gif>&nbsp;
            <% If Not RsNotice.EOF Or Not RsNotice.BOF Then %>
              <%=(RsNotice.Fields.Item("fNoticeTitle").Value)%>
          <% End If ' end Not RsNotice.EOF Or NOT RsNotice.BOF %></TD>
          <TD background=images/index1_5.gif><IMG height=41  
                  src="images/index1_4.gif" width=30></TD>
          <TD width="14"><IMG height=41  src="images/index1_7.gif" width=14></TD>
        </TR>
        <TR>
          <TD height="135" background="images/index1_8.gif">&nbsp;</TD>
          <TD vAlign=top background=images/index1_9.gif colSpan=2><MARQUEE align="left" direction="up" width=100% height="110" scrollAmount=1 scrollDelay=4 onMouseOver="this.stop()" onMouseOut="this.start()">
            <% If Not RsNotice.EOF Or Not RsNotice.BOF Then %>
              <%=(RsNotice.Fields.Item("fNoticeContent").Value)%>
              <% End If ' end Not RsNotice.EOF Or NOT RsNotice.BOF %>
            <% If RsNotice.EOF And RsNotice.BOF Then %>
              <div align="center"><br>
                没有信息!!!</div>
              <% End If ' end RsNotice.EOF And RsNotice.BOF %>
            </MARQUEE>          </TD>
          <TD background="images/index1_10.gif">&nbsp;</TD>
        </TR>
        <TR>
          <TD><IMG height=18  src="images/index1_11.gif" width=16></TD>
          <TD background=images/index1_12.gif 
                colSpan=2></TD>
          <TD><IMG height=18  src="images/index1_13.gif" width=14></TD>
        </TR>
      </TABLE>

<%
RsNotice.Close()
Set RsNotice = Nothing
%>

⌨️ 快捷键说明

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