|
Const adOpenDynamic = 2 '動(dòng)態(tài)游標(biāo)功能最強(qiáng),但耗資源也最多。用戶對(duì)記錄說(shuō)做的修改,增加或刪除記錄都將反映到記錄集中。支持全功能瀏覽(ACCESS不支持)。 Const adOpenStatic = 3 '靜態(tài)游標(biāo),只是數(shù)據(jù)的一個(gè)快照,用戶對(duì)記錄說(shuō)做的修改,增加或刪除記錄都不會(huì)反映到記錄集中。支持向前或向后移動(dòng) Const adLockReadOnly = 1 '鎖定類型,默認(rèn)的,只讀,不能作任何修改 Const adLockPessimistic = 2 '當(dāng)編輯時(shí)立即鎖定記錄,最安全的方式 Const adLockOptimistic = 3 '只有在調(diào)用Update方法時(shí)才鎖定記錄集,而在此前的其他操作仍可對(duì)當(dāng)前記錄進(jìn)行更改、插入和刪除等 Const adLockBatchOptimistic = 4 '當(dāng)編輯時(shí)記錄不會(huì)被鎖定,而更改、插入和刪除是在批處理方式下完成的 Const adCmdText = &H0001 Const adCmdTable = &H0002 %> 18. 網(wǎng)頁(yè)不會(huì)被緩存 HTM網(wǎng)頁(yè) <META HTTP-EQUIV="pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate"> <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"> 或者<META HTTP-EQUIV="expires" CONTENT="0"> ASP網(wǎng)頁(yè) Response.Expires = -1 Response.ExpiresAbsolute = Now() - 1 Response.cachecontrol = "no-cache" PHP網(wǎng)頁(yè) header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); 19. 檢查一段字符串是否全由數(shù)字組成 <script language="javascript"><!-- function checkNum(str){return str.match(/\D/)==null} alert(checkNum("1232142141")) alert(checkNum("123214214a1")) // --></script> 20. 獲得一個(gè)窗口的大小 document.body.clientWidth,document.body.clientHeight 21. 怎么判斷是否是字符 if (/[^\x00-\xff]/g.test(s)) alert("含有漢字"); else alert("全是字符"); 22.TEXTAREA自適應(yīng)文字行數(shù)的多少 <textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight"> </textarea> 23. 日期減去天數(shù)等于第二個(gè)日期 <script language=javascript> function cc(dd,dadd) { //可以加上錯(cuò)誤處理 var a = new Date(dd) a = a.valueOf() a = a - dadd * 24 * 60 * 60 * 1000 a = new Date(a) alert(a.getFullYear() + "年" + (a.getMonth() + 1) + "月" + a.getDate() + "日") } cc("12/23/2002",2) </script> 24. 選擇了哪一個(gè)Radio <HTML><script language="vbscript"> function checkme() for each ob in radio1 if ob.checked then window.alert ob.value next end function </script><BODY> <INPUT name="radio1" type="radio" value="style" checked>Style <INPUT name="radio1" type="radio" value="barcode">Barcode <INPUT type="button" value="check" onclick="checkme()"> </BODY></HTML> 25.獲得本頁(yè)url的request.servervariables("")集合 Response.Write "<TABLE border=1><!-- Table Header --><TR><TD><B>Variables</B></TD><TD><B>value</B></TD></TR>" for each ob in Request.ServerVariables Response.Write "<TR><TD>"&ob&"</TD><TD>"&Request.ServerVariables(ob)&"</TD></TR>" next Response.Write "</TABLE>" 26. 本機(jī)ip<%=request.servervariables("remote_addr")%> 服務(wù)器名<%=Request.ServerVariables("SERVER_NAME")%> 服務(wù)器IP<%=Request.ServerVariables("LOCAL_ADDR")%> 服務(wù)器端口<%=Request.ServerVariables("SERVER_PORT")%> 服務(wù)器時(shí)間<%=now%> IIS版本<%=Request.ServerVariables"SERVER_SOFTWARE")%> 腳本超時(shí)時(shí)間<%=Server.ScriptTimeout%> 本文件路徑<%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%> 服務(wù)器CPU數(shù)量<%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%> 服務(wù)器解譯引擎<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %> 服務(wù)器操作系統(tǒng)<%=Request.ServerVariables("OS")%> 本新聞共 3頁(yè),當(dāng)前在第 2頁(yè) 1 2 3 |
|
【收藏】【打印】【進(jìn)入論壇】 |
|
|
|
|
|
|
|