常用HTML代碼解釋7
23. 永遠(yuǎn)都會(huì)帶著框架
<script. language="JavaScript"><!--
if (window == top)top.location.href = "frames.htm"; //frames.htm為框架網(wǎng)頁(yè)
// --></script>
24. 防止被人frame.
<SCRIPT. LANGUAGE=JAVASCRIPT><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>
25. 網(wǎng)頁(yè)將不能被另存為
<noscript><iframe. src=*.html></iframe></noscript>
26. 查看網(wǎng)頁(yè)源代碼
<input type=button value=查看網(wǎng)頁(yè)源代碼
onclick="window.location = "view-source:"+ "http://www.pconline.com.cn"">
27.刪除時(shí)確認(rèn)
<a href="javascript:if(confirm("確實(shí)要?jiǎng)h除嗎?"))location="boos.asp? &areyou=刪除&page=1"">刪除</a>
28.屏蔽功能鍵Shift,Alt,Ctrl
<script>
function look(){
if(event.shiftKey)
alert("禁止按Shift鍵!"); //可以換成ALT CTRL
}
document.onkeydown=look;
</script>
29. 網(wǎng)頁(yè)不會(huì)被緩存
<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">
30.怎樣讓表單沒(méi)有凹凸感?
<input type=text style="border:1 solid #000000">
或 <input type=text style="border-left:none; border-right:none; border -top:none; border-bottom: 1 solid #000000"></textarea>
點(diǎn)擊加載更多評(píng)論>>