常用javascript特效

來源:互聯網
上載者:User

加入收藏

<a href=javascript:void(0);onclick=window.external.AddFavorite(location.href,document.title);>

[加入收藏]

</a>

鏡框網頁

<table border=15 style=border-style:ridge width=100% height=100%>

<Tr valign=top>

<td>是用table做的,注意修改設定</td>

</tr>

</table>

按鈕凍結

<input type=button value=這個按紐不能操作 disabled>

超級注釋

<a href= http://www.tool.la title=這個串連是串連到首頁的!>一個串連</a>

超級變色

<!--當然如果想叫文字變色可以把bgColor該成fgColor-->

<script language=VbScript>

sub hello

document.bgColor=int(256*256*256*rnd)

end sub

</script>

<!--第二步!注意在body加上這個元素例如把body改成-->

<body onmousemove=hello()>

透明樣式

<!--本樣式是針對圖象而定,運用CSS濾鏡的圖象濾鏡!請務必認真分析以下代碼-->

<img src= http://www.tool.la/images/logo.jpg >

<img src= http://www.tool.la/images/logo.jpg style=filter:alpha(opacity=90,style=1)>

<img src= http://www.tool.la/images/logo.jpg style=filter:alpha(opacity=90,style=2)>

<img src= http://www.tool.la/images/logo.jpg style=filter:alpha(opacity=90,style=3)>

<img src= http://www.tool.la/images/logo.jpg style=filter:alpha(opacity=90,style=4)>

觀察索引值

<body onkeydown=alert("索引值是:"+window.event.keyCode)>請單擊鍵盤試試

四種視窗

<input type=button value=alert onclick=alert("這是第一種")><br>

<input type=button value=confirm onclick=confirm("這個是第二種")><br>

<input type=button value=prompt onclick=prompt("這個是第三個","好不好玩呀?")><br>

<input type=button value=open onclick=window.open("
http://www.tool.la


")>

簡易複選

<label for=one>這個語句已經鎖定複選框拉</lable><input type=checkbox id=one>

 

超級大字

<center>

<span style=font-weight:900;font-size:200pt>

忍<br>

<font face=wingdings>N</font>

<br>者

</span></center>

表格變色

<table border=1 width=50 height=40>

<Tr>

<td onmouseover=this.style.backgroundColor="red"onmouseout=this.style.backgroundColor="#dddddd">

文字

</td>

</tr>

</table>

死屏程式

<!--記住運行可以,運行後的按紐你就可要小心點拉!下載檔案完畢後可以常識-->

<input type=button value=點了以後這一頁就不能動了 onclick=while(true){window.history.back(-1)}>

定時開窗

<!--注意本次我設定為4000,意思就是4秒鐘後開啟視窗-->

<script>function l()

{

window.open(" http://www.tool.la ","name","width=500,height=150,border=0")

}

setTimeout("l()",4000)

</script>

控制列印

<input type=button value=列印本頁 onclick=window.print()>

網頁熱鍵

<!--本例為單擊F12鍵以後可以實現列印網頁功能-->

<script>function look(){

if(event.keyCode=123){window.print()}

}

document.onkeydown=look

</script>你試試單擊F12鍵試試!當然你也可以設定單擊後開啟視窗或其他功能

顯示瀏覽器版本

<script>document.write("你的瀏覽器是"+navigator.appName+" "+navigator.appVersion);

</script>

互動文字

<input type=text name=ee>

<input type=button value=寫入 onclick="Info.innerHTML=ee.value">

<p><br>

<center>

<span id=Info style=filter:glow(color=orange);width:100%;font-size:25pt>

</span>

右健失靈

將<body>改為<body oncontextmenu="self.event.returnValue=false">

Vb寫時間

<script language=VBScript>

sub ns()

msgBox "今天日期是: " & date

msgBox "今天時間為: " & time

end sub

</script>

<input type=button value=今日時間 onclick=ns()>

立體表格

<center>

<table border=1 cellspacing=0><tr><Td bgcolor=navyblue>普通表格</td></tr></table>

<p><table
border=1 cellspacing=0><tr><Td bordercolorlight=black
bordercolordark=white
bgcolor=navyblue>立體表格</td></tr></table>

字元實體

<script>

function yyy()

{

kkk=window.open();

for(var count=33; count<383; count++){

kkk.document.write("<center><table border=1><tr><Td>" + count);

kkk.document.write("</td><td>= </td><td>" + "&" + "#");

kkk.document.write(count + ";</td></tr></table></center>");

}

kkk.document.close();

}

</script>

<input type=button onclick=yyy() value=運行指令碼>

調窗大小

<input type=button value=調節到寬200高300 onclick=window.resizeTo(200,300)>

修改時間

本站最後一次更新時間為:<script>document.write(document.lastModified)</script>

視窗移動

<input type=button value=左移 onclick=window.moveBy(-15,0)>

<input type=button value=右移 onclick=window.moveBy(15,0)>

<input type=button value=上移 onclick=window.moveBy(0,-15)>

<input type=button value=下移 onclick=window.moveBy(0,15)>

曆史按鈕

<input type=button value=後退 onclick=history.go(-1)>

<input type=button value=重新整理 onclick=history.go(-0)>

<input type=button value=前進 onclick=history.go(+1)>

加入頻道

<a href=javascript:window.external.addChannel("typhoon.cdf")>加入頻道</a>

顯示時間

<script>a=new Date();document.write("現在時間是"+a.toLocaleString()+"");</script>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.