ASP 環(huán)境下 VBS 事件應(yīng)用 示例代碼
更新時(shí)間:2007年03月24日 00:00:00 作者:
<%
Class TopicModel
Public OnView
Public Function Load(id)
IF Not(IsEvent(OnView)) Then
OnView(1)
End IF
End Function
Function IsEvent(evnet)
IsEvent = IsEmpty(evnet)
End Function
End Class
Sub UpdateViewCounter(value)
Response.Write("Counter Add "& value &" .")
End Sub
Dim topic : Set topic = new TopicModel
Set topic.OnView = GetRef("UpdateViewCounter")
topic.Load(1)
%>
差點(diǎn)把 GetRef 這個(gè)函數(shù)忘記了 今天剛好看到
寫了個(gè)簡(jiǎn)單示例 有興趣的可以在自己的項(xiàng)目上應(yīng)用下
不過(guò) VBS 的事件弱了點(diǎn) 最實(shí)際的好處其實(shí)是可以動(dòng)態(tài)調(diào)用過(guò)程或函數(shù)
Class TopicModel
Public OnView
Public Function Load(id)
IF Not(IsEvent(OnView)) Then
OnView(1)
End IF
End Function
Function IsEvent(evnet)
IsEvent = IsEmpty(evnet)
End Function
End Class
Sub UpdateViewCounter(value)
Response.Write("Counter Add "& value &" .")
End Sub
Dim topic : Set topic = new TopicModel
Set topic.OnView = GetRef("UpdateViewCounter")
topic.Load(1)
%>
差點(diǎn)把 GetRef 這個(gè)函數(shù)忘記了 今天剛好看到
寫了個(gè)簡(jiǎn)單示例 有興趣的可以在自己的項(xiàng)目上應(yīng)用下
不過(guò) VBS 的事件弱了點(diǎn) 最實(shí)際的好處其實(shí)是可以動(dòng)態(tài)調(diào)用過(guò)程或函數(shù)
相關(guān)文章
ASP+JS三級(jí)聯(lián)動(dòng)下拉菜單[調(diào)用數(shù)據(jù)庫(kù)數(shù)據(jù)]
ASP+JS三級(jí)聯(lián)動(dòng)下拉菜單[調(diào)用數(shù)據(jù)庫(kù)數(shù)據(jù)]...2007-03-03Microsoft VBScript 編譯器錯(cuò)誤 錯(cuò)誤原因 代碼大全
這篇文章主要介紹了Microsoft VBScript 編譯器錯(cuò)誤 錯(cuò)誤原因 代碼大全,需要的朋友可以參考下2015-07-07asp下實(shí)現(xiàn)IP限制函數(shù)代碼
asp下實(shí)現(xiàn)IP限制函數(shù)代碼...2007-11-11ASP 包含文件中的路徑問(wèn)題和使用單一數(shù)據(jù)庫(kù)連接文件的解決方案
全站只需要用一個(gè)數(shù)據(jù)庫(kù)連接文件的實(shí)現(xiàn)函數(shù)代碼2009-03-03ASP實(shí)現(xiàn)智能搜索實(shí)現(xiàn)代碼
asp下智能搜索功能的實(shí)現(xiàn),方便大家學(xué)習(xí)2008-06-06SQL查詢語(yǔ)句通配符與ACCESS模糊查詢like的解決方法
我今天在寫個(gè)頁(yè)面的時(shí)候,也很郁悶,表中明明有記錄,但在ASP里就是搜索不到,原來(lái)是因?yàn)閍ccess與SQL的查詢語(yǔ)句通配符問(wèn)題不同所引起的。2011-02-02