1樓:網友
我現時正好在搞這個。
給你我的關於顯示標題和連線的**:
系統內所有公佈列表。
標題。檢視者。
釋出時間。刪除。
dim thedepar
thedepar="depar")
set rs="")
sql="select * from news order by id asc"'where todepar='"thedepar &"
sql,conn,1,1
if <=0 then
沒有公佈。end if
dim maxlen,thetitle
maxlen=20
-迴圈開始,顯示開始---
如果是最後一頁了。
if nowpage=allpage then
for t=1 to
nextend if
for p=1 to
thetitle=rs("title")
如果變數長度大於20--最長長度,讓變數長度變成(20-2),後接。
if len(thetitle)>maxlen then thetitle=left(thetitle,maxlen-2)&"
bgcolor="#ccffff"<%else%>bgcolor="#ccffcc"<%end if %>
title=<%rs("title")%id=<%rs("id")%imgid=<%rs("imgid")%s=<%rs("time")%writer=<%rs("writer")%target="_blank">
=rs("writer")%
=rs("todepar")%
=rs("time")%
todepar=<%rs("todepar")%imgid=<%rs("imgid")%onclick="return false;}"刪除。
l=l+
2樓:上帝說要有光於是便有了光
chxl_boy 的**呼叫文章標題是沒有問題的。
但是無法實現點選轉到文章功能,因為沒有宣告文章處理頁面。
3樓:
dim vid
vid="typeid")
set rs="")
sql="select * from art_body where typeid='"vid&"'order by typeid desc"
sql,conn,1,1
if <>0 then
資料庫中無資料"
end if
if then
沒有資料"elseend if
rs("name")%
set rs=nothing
set conn=nothing
linkon3 說的問題沒錯,但要分清楚typeid上自動編號型別還是文字型別。
自動編要這樣typeid="&vid&" 文字型別typeid='"vid&"'
asp輸出文章標題
4樓:媽媽說名字太長不記得
判斷字元長度,假如設定16個字元,那麼判斷如果超過16個字元,則顯示前16個字元,加省略號,否則直接顯示。
asp如何分條件輸出不同文章標題
5樓:網友
我在這裡只給你乙個想法,用偽碼寫緩局液出來.首先,把zhuanti單獨存在乙個表裡.
id zhuanit
1 a2 b
3 c在文章表裡,zhuanti列儲存各zhuanti的idid name zhuanti
1 aaaa 1
2 bbbb 2
3 aaa 1
在擾物顯示時篩選出各zhuanti的文章。
set rs_zhuanti="select * from zhuanti")
while not(rs_ or
while not(rs_ or rs_
rs_wenzhang("name")%wendwend
6樓:網友
思路我是理解了,但是我把**複製到我的頁面裡修改了下以後開啟頁面很慢,到現在都沒開啟不知道為什麼。
asp怎麼輸出「分類標題」後再「輸出內容」?
7樓:網友
你的sql思路不對,你先羅列所有cxdh中的所有記錄,然後在羅列的時候又把cxnr中的cx_sy=1的羅列全部,而且是,每羅列cxdh中的一條記錄時,就全部羅列一次,這根本就不對!
我猜你想要的應該是這樣:
set rs=."")
set rs1=."")
select id,cx_title from cxdh",conn,1,1
do while not
這裡放顯示標題的**。
這裡羅列的是類目標題,同時取得id,再根據此id得到相應的內容。
select * from cxnr where cx_sy=1 and 類目id=" & rs("id"),conn,1,1 ' 這裡不知道你的類目id欄位是什麼,所以用這個"類目id"來表示,你應該根據實際情況改這裡。
do while not
這裡放你要顯示的**。
asp 無限分類後如何輸出
8樓:網友
給你個思路吧,我覺得關鍵在於 im_fld 的值,假如我們用這樣的形式來表示各級別的區別:
im_name im_fld
name1 a
name2 b
name4 a_a
name5 a_b
name6 b_a
看到了吧,a,b,c,d...表示第一級。
而a_a,a_b,a_c...表示第一級a的子級。
其他依次類推。
有了這樣的結構,我們就可以寫**了:
'使用im_fld排序。
msql="select * from tab1 order by im_fld"
msql,conn,1,1
do'取得im_fld欄位中"_"的數量,這個就是級別數。
k=0for t=1 to len(mrec("im_fld"))
if mid(mrec("im_fld"),t,1)="_" then k=k+1
next在這裡我用符號"-"來作為分隔符,你可以自行修改。
m_m=""
if k>0 then
for t=1 to k
m_m=m_m & "-"
nextend if
這就是要輸出的行。
mstr=mstr & m_m & mrec("im_name") &"
if then exit do
loopmstr
以上只是乙個大概的思路,詳細的**你需要根據要求進行適當的設計了。
asp中如何讓網頁標題跟文章標題一樣
9樓:網友
在最下面加一這個。
asp 網頁的
10樓:松依
直接定義<%=rs("title")%>就好了。
不過要將資料庫操作語句放到標籤前面。
11樓:張小剛愛生活
輸出title之前讀取文章標題,然後輸出。
或者採用模版,title里加站位符,然後讀取標題後替換站位符即可。
asp把文章標題改成頁面標題
12樓:網友
把文章標題變數寫到裡面可以了。
asp中如何讓瀏覽器標題欄顯示每個文章的標題
首先要讀取資料庫 id int request id sql select from news where chr 10 set rs server.createobject adodb.recordset rs.open sql,conn,0,1 if not rs.eof then arr ne...
急!asp呼叫資料庫,實現產品分類 25
急!asp呼叫資料庫,實現產品 簡單的說您可以去參考sql語言。比如說你的 products 表的列名是 id,class name,products name,color name exec select from products order by id asc 這就會像您所說的按順序,,.如果...
asp程式,把迴圈輸出的結果賦給變數
response.write strtemp 執行後,瀏覽器選單欄 檢視 檢視源 這裡輸出的strtemp變數結果就和你給出的上面 一樣,格式也一樣,可以直接應用 asp 求迴圈輸出變數 pic1 1 pic2 2 pic3 3 pic4 4 myarray array pic1,pic2,pic3...