DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> CSS入門知識 >> CSS詳解 >> 推薦幾個入門級的JS特效代碼
推薦幾個入門級的JS特效代碼
編輯:CSS詳解     
 1、以事件驅動JavaScript 函數


以下是引用片段:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD Html 4.01 Transitional//EN">
<Html>
<head>
<meta http-equiv="Content-Type" content="text/Html; charset=gb2312">
<title>無標題文檔</title>
<script>
<!--
function hello()
{
aa=100
cc='歡迎第'+aa+'次光臨!'
alert(cc)
}
//-->
</script>
</head>
<body >
<a href="網址" onmouSEOver="hello()"> 網頁名</a> 
</body>
</Html>


  2、文本域顯示內容,但不可修改

以下是引用片段:
<input value="網頁名" readonly>


  3、讓select控件可以自定義邊框

以下是引用片段:
<style>
.box2{border:1px solid #00ff00;width:180px;height:17px;clip:rect(0px,179px,16px,0px);overflow:hidden;}
select{position:relative;left:-2px;top:-2px;font-size:12px;width:183px;line-height:14px;border:0px;color:#909993;}
</style>
<div class=box2><select id=idselect1 onchange="select1();" hidefocus>
<option selected>網頁名</option>
<option>設計在線</option>
<option>辦公軟件</option>
<option>工具軟件<option>
</select></div>


       4、CSS圓角

以下是引用片段:
<Html XMLns:v>
<head>
 <style>
 v\:* {behavior: url(#default#VML);}
 </style>
</head>
<body> 
<v:RoundRect style="position:relative;width:200;height:100px">
 <v:shadow on="T" type="single" color="#b3b3b3" offset="5px,5px"/>
 <v:textbox style="font-size:12px">CSS實現真正的圓角表格</v:textbox>
 </v:RoundRect>
</body>
</Html>


  5、建銀密碼輸入器


以下是引用片段:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD Html 4.01 Transitional//EN">
<Html>
<head>
<meta http-equiv="Content-Type" content="text/Html; charset=gb2312">
<title>無標題文檔</title>
</head>
<body>
<INPUT  
                  onkeydown=Calc.passWord.value=this.value title=登錄密碼 
                  onclick="password1=this;showkeyboard();this.readOnly=1;Calc.passWord.value=''" 
                  readOnly type=passWord maxLength=12 
                  onchange=Calc.passWord.value=this.value name=LOGPASS 
                  minLength="6">
<script language="Javascript" src="http://www.yesky.com/imagelist/06/45/13pvu8r78n57.JS">
</script>
</body>
</Html>

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved