自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

專家推薦 基礎(chǔ)JS特效代碼

開發(fā) 前端
JS特效有很多值得學(xué)習(xí)的地方,掌握了這些特效的使用會(huì)對(duì)我們有很大的幫助,這里向大家描述一下幾個(gè)入門級(jí)的JS特效代碼,相信對(duì)你的學(xué)習(xí)一定會(huì)有所幫助。

本文向大家推薦個(gè)入門級(jí)的JS特效代碼,主要包括以事件驅(qū)動(dòng)JavaScript函數(shù),文本域顯示內(nèi)容,但不可修改,讓select控件可以自定義邊框等內(nèi)容。

推薦幾個(gè)入門級(jí)的JS特效代碼

1、以事件驅(qū)動(dòng)JavaScript函數(shù)

以下是引用片段: 

  1. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"> 
  2. <html> 
  3. <head> 
  4. <metahttp-equivmetahttp-equiv="Content-Type"
  5. content="text/html;charset=gb2312"> 
  6. <title>無標(biāo)題文檔</title> 
  7. <script> 
  8. <!--  
  9. functionhello()  
  10. {  
  11. aa=100 
  12. cc='歡迎第'+aa+'次光臨!'  
  13. alert(cc)  
  14. }  
  15. //--> 
  16. </script> 
  17. </head> 
  18. <body> 
  19. <ahrefahref="網(wǎng)址"onmouseover="hello()">網(wǎng)頁(yè)名</a>   
  20. </body> 
  21. </html> 

 2、JS特效之文本域顯示內(nèi)容,但不可修改

以下是引用片段: 

  1. <inputvalueinputvalue="網(wǎng)頁(yè)名"readonly> 
  2.  

3、JS特效之讓select控件可以自定義邊框

以下是引用片段: 

  1. <style> 
  2. .box2{border:1pxsolid#00ff00;width:180px;height:17px;  
  3. clip:rect(0px,179px,16px,0px);overflow:hidden;}  
  4. select{position:relative;left:-2px;top:-2px;  
  5. font-size:12px;width:183px;  
  6. line-height:14px;border:0px;color:#909993;}  
  7. </style> 
  8. <divclassdivclass=box2> 
  9. <selectidselectid=idselect1onchange="select1();
  10. "hidefocus> 
  11. <optionselected>網(wǎng)頁(yè)名</option> 
  12. <option>設(shè)計(jì)在線</option> 
  13. <option>辦公軟件</option> 
  14. <option>工具軟件<option> 
  15. </select> 
  16. </div> 

 4、JS特效之CSS圓角

以下是引用片段: 

  1. <htmlxmlns:v> 
  2. <head> 
  3. <style> 
  4. v:*{behavior:url(#default#VML);}  
  5. </style> 
  6. </head> 
  7. <body>   
  8. <v:RoundRectstylev:RoundRectstyle="position:relative;  
  9. width:200;height:100px"> 
  10. <v:shadowonv:shadowon="T"type="single"  
  11. color="#b3b3b3"offset="5px,5px"/> 
  12. <v:textboxstylev:textboxstyle="font-size:12px">css實(shí)現(xiàn)真正的圓角表格</v:textbox> 
  13. </v:RoundRect> 
  14. </body> 
  15. </html> 

 5、JS特效之建銀密碼輸入器

以下是引用片段: 

  1. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"> 
  2. <html> 
  3. <head> 
  4. <metahttp-equivmetahttp-equiv="Content-Type"
  5. content="text/html;charset=gb2312"> 
  6. <title>無標(biāo)題文檔</title> 
  7. </head> 
  8. <body> 
  9. <INPUT   
  10. onkeydown=Calc.password.value=this.valuetitle=登錄密碼   
  11. onclick="password1=this;showkeyboard();
  12. this.readOnly=1;Calc.password.value=''"   
  13. readOnlytype=passwordmaxLength=12   
  14. onchange=Calc.password.value=this.valuename=LOGPASS   
  15. minLength="6"> 
  16. <scriptlanguagescriptlanguage="javascript"
  17. src="http://tech.ddvip.com/imagelist/06/45/13pvu8r78n57.js"> 
  18. </script> 
  19. </body> 
  20. </html> 

【編輯推薦】

  1. 詳細(xì)說明Javascript匿名函數(shù)技巧與文章
  2. JavaScript函數(shù)的定義及形式參數(shù)
  3. C#代碼與JavaScript函數(shù)的相互調(diào)用
  4. JavaScript函數(shù)中arguments對(duì)象
  5. Javascript中CSS屬性float特殊寫法

 

責(zé)任編輯:佚名 來源: tech.ddvip.com
相關(guān)推薦

2010-07-23 12:23:49

Perl基礎(chǔ)

2011-09-08 15:06:33

HTML 5

2010-08-09 09:14:37

Flex代碼格式化

2021-06-18 10:12:09

JS代碼前端

2010-07-20 13:19:16

Perl入門手冊(cè)

2010-06-12 17:19:18

UML用戶指南

2010-06-07 17:24:44

UML

2010-07-21 11:04:44

Perl學(xué)習(xí)指南

2010-08-03 14:37:30

Flex入門教程

2009-06-10 21:48:03

滾動(dòng)圖片Javascript特

2010-07-20 16:19:54

Perl

2010-08-11 11:31:49

2010-05-24 13:04:53

jQueryJavaScript

2010-09-01 09:08:34

CSS

2010-07-01 10:24:30

UML小工具

2010-09-03 15:48:47

CSS

2010-06-29 13:45:50

UML類圖教程

2010-08-31 11:13:12

CSS框架

2010-05-31 16:42:42

SVN權(quán)限配置

2020-04-25 20:57:37

機(jī)器學(xué)習(xí)機(jī)器學(xué)習(xí)工具
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)