找回密碼
 註冊
搜索
查看: 2496|回復: 2

[教學] 文字框連結顯示

[複製鏈接]
發表於 2008-9-23 20:40:13 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
步驟一、將原始碼複製到<HEAD></HEAD>標籤之間
  1. <!--語法在網頁插入的開始-->
  2. <style type="text/css">
  3. <!--
  4. .menulines{
  5. border:1px solid white;}
  6. .menulines a{
  7. text-decoration:none;
  8. color:black;}
  9. -->
  10. </style>

  11. <script language="javascript1.2">
  12. function borderize(what,color){
  13. what.style.borderColor=color
  14. }
  15. function borderize_on(e){
  16. if (document.all)
  17. source3=event.srcElement
  18. else if (document.getElementById)
  19. source3=e.target
  20. if (source3.className=="menulines"){
  21. borderize(source3,"blue")
  22. }
  23. else{
  24. while(source3.tagName!="TABLE"){
  25. source3=document.getElementById? source3.parentNode : source3.parentElement
  26. if (source3.className=="menulines")
  27. borderize(source3,"blue")
  28. }}}
  29. function borderize_off(e){
  30. if (document.all)
  31. source4=event.srcElement
  32. else if (document.getElementById)
  33. source4=e.target
  34. if (source4.className=="menulines")
  35. borderize(source4,"white")
  36. else{
  37. while(source4.tagName!="TABLE"){
  38. source4=document.getElementById? source4.parentNode : source4.parentElement
  39. if (source4.className=="menulines")
  40. borderize(source4,"white")
  41. }}}
  42. </script>
  43. <!--語法在網頁插入的結束-->
複製代碼

步驟二、將原始碼複製到網頁中欲呈現特效的位置
  1. <!--語法在網頁插入的開始-->
  2. <table border="0" width="155" cellspacing="0" cellpadding="0" onMouseover="borderize_on(event)" onMouseout="borderize_off(event)">
  3. <tr>
  4. <td align="center" width="160" bgcolor="#3177BB"><b><font size="3" color="FFFFFF">JAVA館目錄</font></b></td></tr>
  5. <tr>
  6. <td width="160" class="menulines"><font size="2"><a href="script.htm">javascript特效</font></a></td></tr>
  7. <tr>
  8. <td width="160" class="menulines"><font size="2"><a href="applet.htm">JavaApplet特效</font></a></td></tr>
  9. <tr>
  10. <td width="160" class="menulines"><font size="2"><a href="gci.htm">CGI特效</font></a></td></tr>
  11. <tr>
  12. <td width="160" class="menulines"><font face="Arial" size="2"><a href="dhtml.htm">DHtml特效</a></font></td></tr>
  13. <tr>
  14. <td width="160" class="menulines"><font face="Arial" size="2"><a href="index.htm">返回首頁</a></font></td></tr>
  15. </table>
  16. <!--語法在網頁插入的結束-->
複製代碼
 
發表於 2012-10-15 00:48:12 | 顯示全部樓層
謝謝大大的分享啊!
版主招募中
發表於 2012-10-15 00:50:52 | 顯示全部樓層
支持一下吧  
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|TShopping

GMT+8, 2025-4-30 22:38 , Processed in 0.020823 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回復 返回頂部 返回列表