|
Const adOpenDynamic = 2 '動態(tài)游標功能最強,但耗資源也最多。用戶對記錄說做的修改,增加或刪除記錄都將反映到記錄集中。支持全功能瀏覽(ACCESS不支持)。 Const adOpenStatic = 3 '靜態(tài)游標,只是數(shù)據(jù)的一個快照,用戶對記錄說做的修改,增加或刪除記錄都不會反映到記錄集中。支持向前或向后移動 Const adLockReadOnly = 1 '鎖定類型,默認的,只讀,不能作任何修改 Const adLockPessimistic = 2 '當編輯時立即鎖定記錄,最安全的方式 Const adLockOptimistic = 3 '只有在調(diào)用Update方法時才鎖定記錄集,而在此前的其他操作仍可對當前記錄進行更改、插入和刪除等 Const adLockBatchOptimistic = 4 '當編輯時記錄不會被鎖定,而更改、插入和刪除是在批處理方式下完成的 Const adCmdText = &H0001 Const adCmdTable = &H0002 %> 18. 網(wǎng)頁不會被緩存 HTM網(wǎng)頁 <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)頁 Response.Expires = -1 Response.ExpiresAbsolute = Now() - 1 Response.cachecontrol = "no-cache" PHP網(wǎng)頁 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. 獲得一個窗口的大小 document.body.clientWidth,document.body.clientHeight 21. 怎么判斷是否是字符 if (/[^\x00-\xff]/g.test(s)) alert("含有漢字"); else alert("全是字符"); 22.TEXTAREA自適應文字行數(shù)的多少 <textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight"> </textarea> 23. 日期減去天數(shù)等于第二個日期 <script language=javascript> function cc(dd,dadd) { //可以加上錯誤處理 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. 選擇了哪一個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.獲得本頁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. 本機ip<%=request.servervariables("remote_addr")%> 服務器名<%=Request.ServerVariables("SERVER_NAME")%> 服務器IP<%=Request.ServerVariables("LOCAL_ADDR")%> 服務器端口<%=Request.ServerVariables("SERVER_PORT")%> 服務器時間<%=now%> IIS版本<%=Request.ServerVariables"SERVER_SOFTWARE")%> 腳本超時時間<%=Server.ScriptTimeout%> 本文件路徑<%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%> 服務器CPU數(shù)量<%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%> 服務器解譯引擎<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %> 服務器操作系統(tǒng)<%=Request.ServerVariables("OS")%> |
|
【收藏】【打印】【進入論壇】 |
|
|
|
|
|
|
|