- 2010-04-23
以下是一個簡單的用戶更改密碼的代碼 --------------------- username=request(user_name) pwd=request(pwd) username=replace(username,’,’’) pwd=replace(pwd,’,’’) sql=updatetbl_testsetpwd=’pwd’whereuid=’username’ setrs=
- 2010-04-19
!--#include file=conn.asp-- htmlheadTITLE分頁測試/TITLELINK href=inc/style.css type=text/css rel=stylesheet/head %strHead=strHeadhtml strHead=strHeadhead strHead=strHeadTITLE分頁測試/TITLE strHead=strHeadLINK href=inc/style.cs
- 2010-04-18
原理:在每次提交留言的時候,要輸入隨機生成的4位認證碼. 以下代碼用在ASP 生成隨機4位數(shù): % dim key randomize timer key=Int((8999)*Rnd +1000) % 在表單里顯示: 認證碼:%=key% input type=text name=rekey size=8 maxlength=4 input value=%=key
- 2010-04-14
% OptionExplicit ’數(shù)據(jù)庫: ’location ’表1loaction所在的市表 ’字段 ’loactionid(主鍵) ’loactionname名字 ’表2district所在的縣表 ’字段 ’locationid(主鍵) ’districtid ’districtname ’表3village所在的鄉(xiāng)鎮(zhèn)表 ’字段 ’districtid(主鍵
- 2010-04-13
1.如何用Asp判斷你的網(wǎng)站的虛擬物理路徑 答 使用Mappath方法 p align=centerfont size=4 face=Arialb The Physical path to this virtual website is: /b/font font color=#FF0000 size=6 face=Arial %= Server.MapPath(\)% /font/p 2.我如何
- 2010-04-13
8.強迫輸入密碼對話框 答把這句話放載頁面的開頭 % response.status=401 not Authorized response.end % 9 如何傳遞變量從一頁到另一頁 答 用HIDDEN類型來傳遞變量 % form method=post action=mynextpage.asp % for each item in request.form % input
- 2010-04-13
function isCharsInBag (s, bag) { var i,c; for (i = 0; i s.length; i++) { c = s.charAt(i);//字符串s中的字符 if (bag.indexOf(c) -1) return c; } return ; } 檢查函數(shù): function ischinese(s) { var errorChar; var badChar = ABCDEFGHIJKLMNOPQRST
- 2010-04-13
Function AtoC(a As Currency) As String '說明:本函數(shù)適合于萬億以下的貨幣轉(zhuǎn)換,允許A的值是最多兩位小數(shù) '定義兩個字符串,此處漢字與數(shù)字均按一位計算 Dim String1 As String '如下定義 Dim String2 As String '如下定義 Dim String3 As String '從原A
- 2010-04-12
% setrecordset1=server.createobject(adodb.recordset) exec=SELECT*FROMnewswhereid=id recordset1.Openexec,conn,1,1 % tablewidth=85%border=0align=centercellpadding=3cellspacing=0 trtd ....... % IfRequest(page)=Then pageNum=0
- 2010-04-11
ActiveServerPages,ASP0126(0x80004005)--找不到包含文件 MicrosoftOLEDBProviderforODBCDrivers(0x80040E21)--sql語句出錯(數(shù)據(jù)類型不匹配或表名(字段名)錯誤或表處于編輯狀態(tài),或表不存在于conn打開的數(shù)據(jù)庫中) MicrosoftOLEDBProviderforODBCDrivers(0x800
- 2010-04-10
% '======================================================== '函數(shù)導航 'FormatDate(DT,tp) ------------------------------------------日期格式化 'IsInteger(para) ---------------------------檢測傳遞的參數(shù)是否為數(shù)字型 'ChkrequestDate(Para) ----
- 2010-04-09
錯誤提示: ADODB.Recordset 錯誤 '800a0cc1' Item cannot be found in the collection corresponding to the requested name or ordinal. /index.asp,行15 錯誤原因:服務器上安裝動易組件最新組件,但網(wǎng)站系統(tǒng)是用的4.0,系統(tǒng)沒有找到相應的字段。動易組
- 2010-04-06
解決方法入下: rs.cursorlocation = 3 rs.open sql,conn,1,3
- 2010-04-05
一般來說使用模糊查詢,大家都會想到LIKE select * from table where a like '%字符%' 如果一個SQL語句中用多個 like模糊查詢,并且記錄條數(shù)很大,那速度一定會很慢。 下面兩種方法也可實現(xiàn)模糊查詢: select * from table where patindex('%字符%',a)0 sele
- 2010-04-02
InstrRev函數(shù),從字符串的最后一個搜索起,前面字符串。 % Dim strTXT,pos strTXT=www.webjx.com pos=instrRev(strTXT,.) Response.Write pos % 我們搜索的起始是倒序,從com前的一個點。起始的字符的長度,含此點,共十個字符,返回的結(jié)果將是9。 通過
- 2010-03-30
html head http-equiv=Content-Type content=text/html; charset=gb2312 title/title /head body % LANGUAGE = VBScript % % Const ForReading = 1, ForWriting = 2, ForAppending = 8 Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse
- 2010-03-28
% set rs=server.CreateObject(adodb.recordset) db= db.mdb '只要直接更改數(shù)據(jù)庫名稱就能夠看到效果了。 set conn=server.CreateObject(adodb.connection) connstr=Provider=Microsoft.Jet.OLEDB.4.0;Data Source= Server.MapPath(db) conn.open c
- 2010-03-26
主要要文件有: Index.html實現(xiàn)功能,一個文本框,輸入內(nèi)容并實現(xiàn)提示 search.asp查詢功能,讓文本框輸入的內(nèi)容在數(shù)據(jù)庫中查詢,然后返回給客戶端 conn.asp數(shù)據(jù)庫連接功能,實現(xiàn)與數(shù)據(jù)庫相連 xmlhttp.jsAJAX核心部分,用來把客戶端的數(shù)據(jù)傳給服務端,再把服務端的數(shù)據(jù)
- 2010-03-24
html title /title body % Functiongen_key(digits) ’定義并初始化數(shù)組 dimchar_array(80) ’初始化數(shù)字 Fori=0To9 char_array(i)=CStr(i) Next ’初始化大寫字母 Fori=10To35 char_array(i)=Chr(i+55) Next ’初始化小寫字母 Fori=36To61 char_array(i)=Chr
- 2010-03-23
將數(shù)據(jù)使用間隔字符串存儲可以減少少寫幾個數(shù)據(jù)庫字段,也方便以后對擴展數(shù)據(jù)。 比如:在論壇中用戶的性格有多重性格、樂天達觀、成熟穩(wěn)重、幼稚調(diào)皮、溫柔體貼等等,他們分別對應的值為0、1、2、3、4,在存儲這些數(shù)據(jù)時使用間隔字符串,將數(shù)據(jù)存儲到一個文本