Funded in Economic Academy Http://www.eao.com/design/show.asp?id=174 1.οcοntextMenu = "Window.Event.ReturnValue = FALSE" to thoroughly shield the mouse button NO TABLE> Can be used for Table 2. Cancel to prevent copy 3.οnpaste = "returnfalse" is not allowed to paste 4..οcuepy = "ReturnFalse;" oncut = "Returnfalse;" Prevent copy 5. IE before replacing it with your own icon 6. You can display in your favorites Your icon 7. Close input method 8. Always bring the framework script> 9. Prevent people from frame iframes> //roscript> web page will not be saved as 11. 12. How to Through the ASP's means to check if the visitor uses the agent <% ifRequest.servervariables ("http_x_forwarded_for") <"" "" "" "" "" "" "" "" "" " = # ff0000> You pass the proxy server, "& _" true IP "& Request.ServerVariables" Endif by "HTTP_X_FORDED_FOR") Endif%> 13. Absolute position for the control // javascript FunctionGetie (e) {VART = E.OffSettop; varl = E.Offsetleft; while (e = e.offsetparent) {t = E.Offsettop; l = E.Offsetleft;} alert ("top =" t
"/ NLEFT =" L);} script> //vbscript "body" set = a.offSetParentt = t a.Offsettopl = l a.OffsetleftWendmsgBox "top =" & t & chr (13) & "left =" & l, 64 "Get the position of the control" endfunction -> script> 14. Cursor is the last Functioncc () {Vare = Event.Srcelement; varR = E.CREATEXTRANGE () R.MoveStart (Character, E.Value.L.Collapse (true); r.select ();} script> 15. Judging the source ASP: Request.ServerVariables ("http_referer") JavaScript: Document.referRer 16. Minimize, maximize, close window object> < / Object> object> This example is available for IE 18. Will be cached HTM page or ASP page response.expires = -1Response.expiresabsolute = now () - 1Response.cachecontrol = "no-cache" PHP page Header ("Expires: MON, 26JUL199705: 00: 00GMT"); Header ("Cache-Control: no-cache, must-revALIDATE" HEADER ("Pragma: No-Cache"); 19. Check if a string is fully consisting of numbers script> 20. Gets the size of a window Document.Body.ClientWidth, Document.Body.ClientHT 21. How to determine whether it is a character if (/ [^ / x00- / xff] /g.test (s)) ALERT ("with Chinese characters"); Elsealert ("all characters"); 22.Textarea adaptive text line number how textarea> 23. date minus the number of days equal to the second date functioncc (dd, dadd ) {// can be added to the error handling VARA = NewDate (DD) a = a.Valueof () a = a-dadd * 24 * 60 * 60 * 1000A = newdate (a) alert (A.GetfullyEAR () "year " (A.GetMonth () 1) " Month " A.Getdate () " Day ")} CC (" 12/23/2002 ", 2) script> 24. Select which one radio functioncheckme () foreachobinradio1ifob.checkedthenwindow.alertob.valuenextendfunction script> style barode body> html> 25. Getting Request.SerVariables ("") collection response.write " Variables b> td> value b> td> tr> "foreachobinRequest.servervariablesresponse.write" "& ob &" TD> "& Request.ServerVariables (ob) &" td> tr> "nextResponse.write" Table> "27.enter key to move the cursor to the next input box 28. Detects a link speed of a website: add the following code to the area: Tim = 1setInterval "TIM ", 100) b = 1 Varautourl = NEWARRAY () Autourl [1] = " www.njcatv.net" Autourl [2] = "javacool .3322.NET "autOourn [3] =" www.sina.com.cn "Autourl [4] =" www.nuaa.edu.cn " AutOOrl [5] = " www.cctv.com" FunctionButt () {document.write ("" for (vari = 1 i =" = ") Document.write (" form> "
)} Butt () FunctionAuto (URL) {document.forms [0] ["URL" B] .Value = urlif (Tim> 200) {document.forms [0] ["txt" b] .value = " Link timeout "} else {document.forms [0] [" txt " b] .Value =" Time " TIM / 10 " second "} b } functionRun () {for (vari = 1; i http: // ";; autOourn ")> ")} Run () script> 29. Corbus: Standard Cursor Default: Standard Arrow HAND: Hand Cursor Wait: Waiting Cursor TEXT: I-shaped cursor VERTICAL-TEXT: Horizontal I-shaped NOT NO-DROP: Unable to Dragon Cursor NOT-ALLOWED: Invalid Cursor Help: Help Cursor All-Scroll: Triangle Directional Move: Mobile Crosshair: Ten Board E- Resizen-resizenw-resizew-resizes-resizesw-resize 1. Non-cache, automatically refresh response.expires = 0Response.addheader "pragma", "no-cache" response.addheader "cache-control", "Private "2. Modify ContentType and download the GIF format <% FunctionDL (f, n) OneRrorRRESUMENEXT set = createObject (" AdoDb.Stream ") smode = 3s.Type = 1s.Opens.LoadFromFile (Server.MAppath (f)) Iferr.Number> 0thenResponse.writeerr.number & ":" & err.descriptionelseresponse.contettype = "Application / X-gzip" response.addheader "Content -disposition: "," attachment; filename = "& nresponse.binaryWrite (S.Size) EndifendFunction CallDL (" 012922501.gif "," T1.GIF ")%> 19. Check if a string is full Number composition
转载请注明原文地址:https://www.9cbs.com/read-14525.html