直播中
語法
Counters.Get(CounterName)
參數(shù)
CounterName
包含計(jì)數(shù)器名稱的字符串。
示例
用 <%= Counters.Get(CounterName) %> 可顯示計(jì)數(shù)器的值。用 <% countervar = Counters.Get(CounterName) %> 將計(jì)數(shù)器的值賦給一個(gè)變量。
下列腳本顯示關(guān)于所喜愛的顏色的民意測(cè)驗(yàn)的投票記分。
<% If colornumber = "1" Then
Counters.Increment("greencounter")
Else
If colornumber = "2" Then
Counters.Increment("bluecounter")
Else
If colornumber = "0" Then
Counters.Increment("redcounter")
End If
End If
End If %>
<P>Current vote tally:
<P>red: <% =Counters.Get("redcounter") %>
<P>green: <% = Counters.Get("greencounter") %>
<P>blue: <% = Counters.Get("bluecounter") %>