권장 : 관개를 방지하고 메시지를 남기는 방법 (무작위로 생성 된 4 자리 인증 코드) 원칙 : 메시지를 제출할 때마다 무작위로 생성 된 4 자리 인증 코드를 입력해야합니다. 다음 코드는 ASP에서 임의의 4 자리 숫자를 생성하는 데 사용됩니다. % Dim Key Randomize Timer Key = int ((8999)*rnd +1000) % 형식에 표시됨 : 인증 코드 : % = 키 % 입력 유형 = 텍스트 이름 = Rekey size = 8 maxlength = 4 입력 값 = % = 키
<%옵션 출현
'데이터 베이스:
'위치
'표 1 LOACTION은 도시 테이블에 있습니다
'필드
'loactionid (1 차 키)
'loactionName 이름
'표 2district's County Table
'필드
'LocationID (기본 키)
'지구
'DistrictName
'표 3. 마을이 위치한 마을
'필드
'DistrictID (1 차 키)
'마을
'villagename
%>
<html>
<헤드>
<title> 목록 </title>
<metahttp-equiv = content-typecontent = text/html; charset = gb2312>
<%
디콘
희미한
dimsql
디미커
Dimrs1
dimsql1
Dimrs2
dimsql2
dimcount2
Dimconnstr
connstr = dbq =+server.mappath (db11.mdb)+; defaultDir =; driver = {Microsoft AccessDriver (*. mdb)};
setconn = server.createobject (adodb.connection)
conn.openconnstr
sql = select*fromdirectorbyLocationIdasc
setrs = conn.execute (SQL)
%>
<scriptLanguage = javaScript>
VaroneCount;
oneCount = 0;
subcat = newArray ();
<%
카운트 = 0
dowhilenotrs.eof
%>
Subcat [<%= count%>] = newArray (<%= trim (rs (ristringname))%>, <%= trim (rs (locationId))%>, <%= trim (rs (ristricid))%;
<%
count = count+1
rs.movenext
고리
Rs.Close
setrs = 아무것도
%>
공유 : ASP는 정적 HTM 목록 페이징을 생성합니다 (코드 포함, 성공적으로 테스트) !-#include include = conn.asp--- htmlheadtitle Pagination 테스트/titlelink href = inc/style.css type = text/css rel = 스타일 시트/헤드 %strhead = strheadhtml strhead = strheadhead strhead = strheadtitle Pagtitle Pagtitle Pagtitle Paglination 테스트/타이틀 링크 href = inc/style.cs.
이전 페이지의 총 3 페이지 123 다음 페이지