大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网页设计 -> 经验技巧 -> 实用网页代码

实用网页代码

时间: 2021-07-31 作者:daque

1.oncontextmenu="window.event.returnvalue=false"将完全樊篱鼠标右键<table border oncontextmenu=return(false)><td>no</table>可用来table2.<body onselectstart="return false">废除采用、提防复制3.onpaste="return false"不准粘贴4.oncopy="return false;" oncut="return false;"提防复制5.<link rel="shortcut icon" href="favicon.ico"> ie地方栏前换成本人的图标6.<link rel="bookmark" href="favicon.ico">不妨在保藏夹中表露出你的图标7.<input style="ime-mode:disabled">封闭输出法8.长久城市带着框架<script language="javascript"><!--if (window == top)top.location.href = "frames.htm"; file://frames.htm为框架网页// --></script>9.提防被人frame<script language=javascript><!-- if (top.location != self.location)top.location=self.location;// --></script>10. <noscript><iframe src=*.html></iframe></noscript>网页将不许被另存为11. <input type=button value=察看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">12. 还好吗经过asp的本领来查看来访者能否用了代劳<% if request.servervariables("http_x_forwarded_for")<>"" thenresponse.write "<font color=#ff0000>您经过了代劳效劳器,"& _"如实的ip为"&request.servervariables("http_x_forwarded_for")end if%>13. 博得控件的一致场所file://javascript<script language="javascript">function getie(e){var t=e.offsettop;var l=e.offsetleft;while(e=e.offsetparent){t+=e.offsettop;l+=e.offsetleft;}alert("top="+t+"\nleft="+l);}</script>file://vbscript<script language="vbscript"><!--function getie()dim t,l,a,bset a=document.all.img1t=document.all.img1.offsettopl=document.all.img1.offsetleftwhile a.tagname<>"body"set a = a.offsetparentt=t+a.offsettopl=l+a.offsetleftwendmsgbox "top="&t&chr(13)&"left="&l,64,"获得控件的场所"end function--></script>14. 光标是停在文本框笔墨的结果<script language="javascript">function cc(){var e = event.srcelement;var r =e.createtextrange();r.movestart('character',e.value.length);r.collapse(true);r.select();}</script><input type=text name=text1 value="123" onfocus="cc()">15. 确定上一页的根源asp:request.servervariables("http_referer")javascript:document.referrer16. 最小化、最大化、封闭窗口<object id=hh1 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="command" value="minimize"></object><object id=hh2 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="command" value="maximize"></object><object id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="command" value="close"></object><input type=button value=最小化 onclick=hh1.click()><input type=button value=最大化 onclick=hh2.click()><input type=button value=封闭 onclick=hh3.click()>本例实用于ie17. <%'设置数据库贯穿的少许恒量const adopenforwardonly = 0 '游标只向前欣赏记载,不扶助分页、recordset、bookmarkconst adopenkeyset= 1 '键集游标,其余用户对记载说做的窜改将反应到记载会合,但其余用户减少或简略记载不会反应到记载会合。扶助分页、recordset、bookmarkconst adopendynamic = 2 '动静游标功效最强,但耗费资金源也最多。用户对记载说做的窜改,减少或简略记载都将反应到记载会合。扶助全功效欣赏(access不扶助)。const adopenstatic= 3 '静态游标,不过数据的一个快速照相,用户对记载说做的窜改,减少或简略记载都不会反应到记载会合。扶助向前或向后挪动const adlockreadonly= 1 '锁定典型,默许的,只读,不许作任何窜改const adlockpessimistic = 2 '当编纂时登时锁定记载,最安定的办法const adlockoptimistic= 3 '惟有在挪用update本领时才锁定记载集,而在此前的其余操纵仍可对暂时记载举行变动、插入和简略等const adlockbatchoptimistic = 4 '当编纂时记载不会被锁定,而变动、插入和简略是在批处置办法下实行的const adcmdtext= &h0001const adcmdtable = &h0002%>18. 网页不会被缓存htm网页<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网页response.expires = -1response.expiresabsolute = now() - 1response.cachecontrol = "no-cache"php网页header("expires: mon, 26 jul 1997 05:00:00 gmt");header("cache-control: no-cache, must-revalidate");header("pragma: no-cache");

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.