站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Javascript 专题文字链接技术基础

文字链接技术基础

摘要: 文字链接技术基础
<tr> <td>

<textarea class=fm id=code rows=12 cols=78>

盛夏      尚 涛 

一夜露痕黄粉香 袁运甫

瑶池昨夜新凉  王金岭

一朵白莲随意开 吴冠南

新雨迎秋欲满塘 齐辛民

十里荷香    齐辛民

濯清莲而不妖  卢世曙



</textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

<textarea class=fm id=code1 rows=12 cols=78> <table width="388" border="1" cellpadding="3" cellspacing="0" bordercolor="#efefef" bgcolor="#efefef"> <tr> <td onMouseOut="this.bgColor='#efefef';this.borderColor='#efefef'"; onMouseOver="this.bgColor='#cccccc'; this.borderColor='#000033'">每天有每天的事,每天有每天的麻烦。所以不用怕。</td> </tr> <tr> <td onMouseOut="this.bgColor='#efefef';this.borderColor='#efefef'"; onMouseOver="this.bgColor='#cccccc'; this.borderColor='#000033'">让自己不至于在等待回贴的过程中血气上涌</td> </tr> <tr> <td onMouseOut="this.bgColor='#efefef';this.borderColor='#efefef'"; onMouseOver="this.bgColor='#cccccc'; this.borderColor='#000033'">佛曰:一切经典首句应安“如是我闻”等证信的句子</td> </tr> </table>


<table border="0" cellpadding="0" cellspacing="0"><tr><td class="doc_sign">      
<table width="234" border="0" cellspacing="3" cellpadding="0"> <tr> <td height="20">没有最好,</td> <td>只有更好!</td> </tr> <tr> <td height="20">在成为高手之</td> <td>前先摆脱白痴</td> </tr> </table></textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code1')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code1) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code1) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

滚动公告板,文字链接下划虚线,背景变色:

<textarea class=fm id=code2 rows=12 cols=78> <table width=380 bgcolor=#f7f8f9 border=0 cellspacing=0 style="border:#cccccc 1px solid;" height="18"><tr><td>

</td></tr></table> <script> marqueesHeight=18; stopscroll=false; icefable1.scrollTop=0; with(icefable1){ style.width=0; style.height=marqueesHeight; style.overflowX="visible"; style.overflowY="hidden"; noWrap=true; onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false"); } preTop=0; currentTop=0; stoptime=0; function init_srolltext(){ icefable2.innerHTML=""; icefable2.innerHTML+=icefable1.innerHTML; icefable1.innerHTML=icefable2.innerHTML+icefable2.innerHTML; setInterval("scrollUp()",50); } function scrollUp(){ if(stopscroll==true) return; currentTop+=1; if(currentTop==19) { stoptime+=1; currentTop-=1; if(stoptime==50) { currentTop=0; stoptime=0; } } else { preTop=icefable1.scrollTop; icefable1.scrollTop+=1; if(preTop==icefable1.scrollTop){ icefable1.scrollTop=icefable2.offsetHeight-marqueesHeight; icefable1.scrollTop+=1; } } } init_srolltext(); </script>


</textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code2')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code2) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code2) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

<textarea class=fm id=code3 rows=12 cols=78>

<table width="700" border="0" cellpadding="1" cellspacing="1" bgcolor="#006699"> <tr bgcolor="#FFFFFF"> <td width="240" onmouseover="this.className='aa'" onmouseout="this.className='bb'" class="bb">要为成功找方法,不为失败找借口</td> <td width="453" onmouseover="this.className='aa'" onmouseout="this.className='bb'" class="bb">如果可能,我愿跟他换。。。 </td> </tr> <tr bgcolor="#FFFFFF"> <td class="style2" onmouseover="this.className='aa'" onmouseout="this.className='bb'">-----------我就是邪恶的分割线----- -----</td> <td class="style2" onmouseover="this.className='aa'" onmouseout="this.className='bb'">走过,路过,不要错过!</td> </tr> </table>


仍然拣尽寒枝不肯安歇 微带着后悔 寂寞沙洲我该思念谁</textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code3')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code3) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code3) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

给链接加上一个小小的晶格化滤镜:

<textarea class=fm id=code4 rows=12 cols=78>

<table width="380" height="100" border="0" cellpadding="0" cellspacing="0"> <tr> <td>既不回头,何必不忘;</td> <td>既然无缘,何须誓言;</td> </tr> <tr> <td>今日种种,似水无痕;</td> <td>明夕何夕,君以陌路。</td> </tr> </table>


<script defer> var ar=document.getElementsByTagName('a') for (var i=0;i | 萧萧小雨 | 金翅擘海 | | 蓝色月光 | 西林生存 | 红色黑客 |</textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code4')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code4) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code4) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

用图片修饰一下文字链接:

<textarea class=fm id=code5 rows=12 cols=78>

人皆可以为尧舜,一切众生皆可成佛! </td></tr></table>



链接后面的加个动态图标....</textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code5')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code5) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code5) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

<textarea class=fm id=code6 rows=12 cols=78>

  • 金翅擘海
  • 我佛山人
</textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code6')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code6) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code6) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

另外可参考css打造多彩文字链接:

<textarea class=fm id=code7 rows=12 cols=78><head> <body>

腳本特效展示

<table borderColor="#0099cc" cellSpacing="0" borderColorDark="#0099cc" cellPadding="15" width="450" borderColorLight="#0099cc" border="1"> <tr> <td height="56">
<table cellSpacing="1" cellPadding="5" width="300" align="center" bgColor="#cccccc" border="0"> <tr align="middle" bgColor="#ffffff"> <td class="txt10" colSpan="2">CSS打造多彩文字鏈接</td> </tr> <tr bgColor="#cccccc"> <td>一、</td> <td>初級鏈接樣式</td> </tr> <tr bgColor="#ffffff"> <td>1、</td> <td>普通鏈接</td> </tr> <tr bgColor="#ffffff"> <td>2、</td> <td>無下劃線鏈接</td> </tr> <tr bgColor="#ffffff"> <td>3、</td> <td>雙劃線鏈接</td> </tr> <tr bgColor="#ffffff"> <td>4、</td> <td>刪除線鏈接</td> </tr> <tr bgColor="#cccccc"> <td>二、</td> <td>進階鏈接樣式風格</td> </tr> <tr bgColor="#ffffff"> <td>1、</td> <td>另類下劃線的原理</td> </tr> <tr bgColor="#ffffff"> <td>2、</td> <td>定制下劃線色彩</td> </tr> <tr bgColor="#ffffff"> <td>3、 </td> <td>定制下劃線距離</td> </tr> <tr bgColor="#ffffff"> <td>4、 </td> <td>定制下劃線長度和對齊方式</td> </tr> <tr bgColor="#ffffff"> <td>5、 </td> <td>定制雙下劃線</td> </tr> <tr bgColor="#ffffff"> <td>6、 </td> <td>按鈕式鏈接</td> </tr> <tr bgColor="#cccccc"> <td>三、</td> <td>高級鏈接樣式風格</td> </tr> <tr bgColor="#ffffff"> <td>1、</td> <td>定義塊狀鏈接</td> </tr> <tr bgColor="#ffffff"> <td>2、</td> <td>定義按鈕風格的鏈接</td> </tr> <tr bgColor="#ffffff"> <td>3、</td> <td>定義特效鏈接</td> </tr> <tr bgColor="#ffffff"> <td>4、</td> <td>靜態背景切換鏈接</td> </tr> <tr bgColor="#ffffff"> <td>5、</td> <td>動態背景切換鏈接</td> </tr> </table>
</td> </tr> </table>
</head></textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code7')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code7) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code7) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

文字链接效果巧制作:

<textarea class=fm id=code8 rows=12 cols=78> HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <head> 文字链接效果巧制作 <link> href="http://www.etimestudio.com/style/border2.css" rel="stylesheet" type="text/css"> <link> href="http://www.etimestudio.com/style/border2.css" rel="stylesheet" type="text/css"> <link> href="http://www.etimestudio.com/style/9pt.css" rel="stylesheet" type="text/css"> <link> href="http://www.etimestudio.com/style/glow.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#0070cc" text="yellow"> <table width="700" border="0" align="center" cellpadding="0" cellspacing="0" class="border"> <tr> <td height="30" valign="middle" class="glow" >

文字链接效果巧制作
</td> </tr> <tr> <td height="25">
文/E点时间
</td> </tr> <tr> <td valign="top" class="text"><table width="500" height="60" border="0" align="center" cellspacing="0" class="border2"> <tr> <td width="125">
去下划线
</td> <td width="125" height="30">
链接变色
</td> <td width="125">
链接加粗
</td> <td>
中线链接
</td> </tr> <tr> <td>
双线链接
</td> <td height="30">
背景颜色
</td> <td>
虚线链接
</td> <td>
移动链接
</td> </tr> </table></td> </tr> <tr> <td valign="top" class="text"><table width="650" border="0" align="center" cellspacing="0" class="9p"> <tr> <td>&nbsp;</td> </tr> <tr> <td> &nbsp;&nbsp;&nbsp;&nbsp;把鼠标依次放在上面的文字上,看到了吗?这八种应该差不多可以包括目前网页上常见的超链接效果了,如果还有没写到的别忘了告诉我哦。这些效果都是通过Dreamweaver的CSS功能实现的,非常easy啦,让我们来一个一个地解决它们!

</td> </tr>
<table id="Table1" border="1" style="WIDTH: 264px; HEIGHT: 77px" width="264" bordercolordark=#EFEFC7 bgcolor=#C6D39C bordercolorlight=#4B6928> <tr><td>我如清泉-----清澈见底 一览无余</td></tr><tr><td>吾乃大海-----汹涌澎湃 狂热不已</td></tr></table> </table></td> </tr> </table> </td> </tr> </table>

&nbsp;

&nbsp;

</textarea>

<input style="CURSOR: hand" onfocus=this.blur() onclick="runEx('code8')" type=button value=运行代码> <input style="WIDTH: 95px; CURSOR: hand" onfocus=this.blur() onclick=cycode(code8) type=button value=复制到剪贴板 name=Submit> <input style="CURSOR: hand" onfocus=this.blur() onclick=svcode(code8) type=button value=另存代码> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

</td> </tr> </table>
↑返回目录
前一篇: 浮动菜单是如何作出来的mouse事件
后一篇: 关于textarea的直观换行