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

常用HTML代碼解釋7

提問(wèn)人:劉團(tuán)圓發(fā)布時(shí)間:2020-10-10

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> 

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

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