TShopping

標題: 文字框連結顯示 [打印本頁]

作者: woff    時間: 2008-9-23 20:40
標題: 文字框連結顯示
步驟一、將原始碼複製到<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. <!--語法在網頁插入的結束-->
複製代碼

作者: paossa    時間: 2012-10-15 00:48
謝謝大大的分享啊!
作者: asdqwe0123    時間: 2012-10-15 00:50
支持一下吧  




歡迎光臨 TShopping (http://www.tshopping.com.tw/) Powered by Discuz! X3.2