位置:首頁 > 軟件操作教程 > 編程開發(fā) > HTML > 問題詳情

常用HTML代碼解釋7

提問人:劉團圓發(fā)布時間:2020-10-10

23. 永遠都會帶著框架
<script. language="JavaScript"><!--
if (window == top)top.location.href = "frames.htm"; //frames.htm為框架網(wǎng)頁
// --></script>

 

24. 防止被人frame.

 

<SCRIPT. LANGUAGE=JAVASCRIPT><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>

 

25. 網(wǎng)頁將不能被另存為

 

<noscript><iframe. src=*.html></iframe></noscript>

 

26. 查看網(wǎng)頁源代碼

 

<input type=button value=查看網(wǎng)頁源代碼
onclick="window.location = "view-source:"+ "http://www.pconline.com.cn"">

 

27.刪除時確認

 

<a href="javascript:if(confirm("確實要刪除嗎?"))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)頁不會被緩存
<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.怎樣讓表單沒有凹凸感?
<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> 

繼續(xù)查找其他問題的答案?

相關(guān)視頻回答
回復(fù)(0)
返回頂部