ASP編程中15個(gè)非常有用的例子(一)_ASP教程
推薦:Asp三級(jí)聯(lián)動(dòng)下拉菜單數(shù)據(jù)庫(kù)版(含源程序)% OptionExplicit ’數(shù)據(jù)庫(kù): ’location ’表1loaction所在的市表 ’字段 ’loactionid(主鍵) ’loactionname名字 ’表2district所在的縣表 ’字段 ’locationid(主鍵) ’districtid ’districtname ’表3village所在的鄉(xiāng)鎮(zhèn)表 ’字段 ’districtid(主鍵
1.如何用Asp判斷你的網(wǎng)站的虛擬物理路徑
答 使用Mappath方法
<p align="center"><font size="4" face="Arial"><b>
The Physical path to this virtual website is:
</b></font>
<font color="#FF0000" size="6" face="Arial">
<%= Server.MapPath("\")%>
</font></p>
2.我如何知道使用者所用的瀏覽器?
答 使用the Request object方法
strBrowser=Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strBrowser,"MSIE") <> 0 Then
Response.redirect("ForMSIEOnly.htm")
Else
Response.redirect("ForAll.htm")
End If
3。如何計(jì)算每天的平均反復(fù)訪問(wèn)人數(shù)
答 解決方法
<% startdate=DateDiff("d",Now,"01/01/1990")
if strdate<0 then startdate=startdate*-1
avgvpd=Int((usercnt)/startdate) %>
顯示結(jié)果
<% response.write(avgvpd) %>
that is it.this page have been viewed since November 10,1998 分享:關(guān)于阻止灌水留言的一個(gè)方法(隨機(jī)生成的4位認(rèn)證碼)原理:在每次提交留言的時(shí)候,要輸入隨機(jī)生成的4位認(rèn)證碼. 以下代碼用在ASP 生成隨機(jī)4位數(shù): % dim key randomize timer key=Int((8999)*Rnd +1000) % 在表單里顯示: 認(rèn)證碼:%=key% input type=text name=rekey size=8 maxlength=4 input value=%=key
- asp FSO 讀寫(xiě)文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫(kù)實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過(guò)濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁(yè)模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無(wú)組件分頁(yè)實(shí)現(xiàn)思路及代碼
ASP教程Rss訂閱編程教程搜索
ASP教程推薦
- ASP快速開(kāi)發(fā)方法之?dāng)?shù)據(jù)操作
- ASP中CINT和INT的區(qū)別
- 學(xué)ASp動(dòng)態(tài)網(wǎng)頁(yè)必備:常用的38個(gè)函數(shù)
- 怎樣提高asp程序訪問(wèn)速度
- 淺析asp無(wú)組件上傳并插入到數(shù)據(jù)庫(kù)里
- 實(shí)現(xiàn)ASP頁(yè)面的防采集
- ASP 3.0高級(jí)編程(四十五)
- Asp class一個(gè)標(biāo)簽引擎類(lèi)tagEngine.Class
- 教大家如何利用ASP打造網(wǎng)站論壇DIY(1)
- 淺析js返回字符串中某個(gè)字符的出現(xiàn)次數(shù)
- 相關(guān)鏈接:
- 教程說(shuō)明:
ASP教程-ASP編程中15個(gè)非常有用的例子(一)
。