求此超链接效果代码 关键是 http://www.rainersu.com/htc/xshy.htc这个文件,下栽下来就看到了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>var rate = 20; var obj; var act = 0; var elmH = 0; var elmS = 128; var elmV = 255; var clrOrg; var TimerID; if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) { Browser = true;} else { Browser = false;}if (Browser) { document.onmouseover = doRainbowAnchor; document.onmouseout = stopRainbowAnchor;}function doRainbow(){ if (Browser && act != 1) { act = 1; obj = event.srcElement; clrOrg = obj.style.color; TimerID = setInterval("ChangeColor()",100); }}function stopRainbow(){ if (Browser && act != 0) { obj.style.color = clrOrg; clearInterval(TimerID); act = 0; }}function doRainbowAnchor(){ if (Browser && act != 1) { obj = event.srcElement; while (obj.tagName != 'A' && obj.tagName != 'BODY') { obj = obj.parentElement; if (obj.tagName == 'A' || obj.tagName == 'BODY') break; } if (obj.tagName == 'A' && obj.href != '') { act = 1; clrOrg = obj.style.color; TimerID = setInterval("ChangeColor()",100); } }}function stopRainbowAnchor(){ if (Browser && act != 0) { if (obj.tagName == 'A') { obj.style.color = clrOrg; clearInterval(TimerID); act = 0; } }}function ChangeColor(){ obj.style.color = makeColor();}function makeColor(){ if (elmS == 0) { elmR = elmV; elmG = elmV; elmB = elmV; } else { t1 = elmV; t2 = (255 - elmS) * elmV / 255; t3 = elmH % 60; t3 = (t1 - t2) * t3 / 60; if (elmH < 60) { elmR = t1; elmB = t2; elmG = t2 + t3; } else if (elmH < 120) { elmG = t1; elmB = t2; elmR = t1 - t3; } else if (elmH < 180) { elmG = t1; elmR = t2; elmB = t2 + t3; } else if (elmH < 240) { elmB = t1; elmR = t2; elmG = t1 - t3; } else if (elmH < 300) { elmB = t1; elmG = t2; elmR = t2 + t3; } else if (elmH < 360) { elmR = t1; elmG = t2; elmB = t1 - t3; } else { elmR = 0; elmG = 0; elmB = 0; } } elmR = Math.floor(elmR); elmG = Math.floor(elmG); elmB = Math.floor(elmB); clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16); elmH = elmH + rate; if (elmH >= 360) elmH = 0; return clrRGB;}</script><a href="link.htm" target="_blank">链接效果</a> 上述代码的效果的确不错,不过若用相关flash插件可能会更好 晕,那还要什么效果,就是这个了拉。我看了半天。要不就是改透明度。把连接改成<head><style>.blendTrans{filter:alpha(opacity=30) blendTrans(duration=1)}</style><script>function over(){ with(event.srcElement.filters){ blendTrans.apply(); alpha.opacity=100; blendTrans.play(); }}function out(){ with(event.srcElement.filters){ blendTrans.apply(); alpha.opacity=20; blendTrans.play(); }}</script></head><a href=# class="blendTrans" onmouseover="over()" onmouseout="out()">aaaaa</a>--------------------------------不知道哪里有错误!??? 这个也很酷哦<p onmousemove="hello()">这个也很酷哦</p> <p><script language="VBScript"> sub hello document.fgColor=int(256*256*256*rnd) end sub </script></p> 以前也做过一个链接效果,是渐变的,也是HTC写的<!--------------------------------------------------------文件名 :Link.HTC功能 :链接的亮度渐变过程系统要求:IE 5.0 or later历史记录:操作 作者 时间 建立 美洲豹 2002/5/3-------------------------------------------------------------------------><PUBLIC:COMPONENT><PUBLIC:ATTACH onevent="domouseover()" event="onmouseover"/><PUBLIC:ATTACH onevent="domouseout()" event="onmouseout"/></PUBLIC:COMPONENT><script language="JScript">element.runtimeStyle.color="#000000";//初始化 使用比较深的颜色,初始的时候亮度先变暗var startColor = 0x000000; //开始颜色var endColor = 0xff0000; //结束颜色var v = startColor;var step = 0x0f0000;var fadeId=null;function domouseover(){ step=0x0f0000; if(fadeId) clearTimeout(fadeId); fade();}function domouseout(){ step=0x0f0000; if(fadeId) clearTimeout(fadeId); fade1();}function fade(){ if(v<=endColor){ v+=step; element.runtimeStyle.color = v; fadeId=setTimeout(fade,2); } }function fade1(){ if(v>=startColor){ v-=step; element.runtimeStyle.color = v; fadeId=setTimeout(fade1,50); }}</script>HTML文件<style>.richLink{ text-decoration : none; color:black; cursor:hand; behavior:url(htc/link.htc); font-family : 宋体; font-size:9pt;}</style><span class="richLink">链接文字</span> panjisheng(菜虫)HTC文件我倒是真的从没用过,我下下来了,效果还是出不来! 非常简单的js验证问题 ext 动态异步加载的树 推荐一个免费的在线编辑系统(CSDN的blog就是使用这个系统的简化版) 帮忙修改个小代码 高分求解:如何自动点击执行alert()出现的确定按钮,而无须人为操作。 怎样令到一个frame拖动一定距离就不让他再拖动啊 来讨论一下在yaohoo页面执行脚本的问题 有哪位大侠可以给一个带链接的分级菜单的程序? 使用<Iframe>...</IFrame>可实现web编辑器的功能.可是如何将用户本次编辑的内容保存,方便下次打开继续编辑呢? 100分求将小写金额转换大写金额的函数 关于文件上传对象只读问题 关于window.open的弱问题
var rate = 20;
var obj;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
Browser = true;
} else {
Browser = false;
}if (Browser) {
document.onmouseover = doRainbowAnchor;
document.onmouseout = stopRainbowAnchor;
}
function doRainbow()
{
if (Browser && act != 1) {
act = 1;
obj = event.srcElement;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}function stopRainbow()
{
if (Browser && act != 0) {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
function doRainbowAnchor()
{
if (Browser && act != 1) {
obj = event.srcElement; while (obj.tagName != 'A' && obj.tagName != 'BODY') {
obj = obj.parentElement;
if (obj.tagName == 'A' || obj.tagName == 'BODY')
break;
} if (obj.tagName == 'A' && obj.href != '') {
act = 1;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}
}
function stopRainbowAnchor()
{
if (Browser && act != 0) {
if (obj.tagName == 'A') {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
}
function ChangeColor()
{
obj.style.color = makeColor();
}function makeColor()
{
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 - elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 - t2) * t3 / 60; if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 - t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 - t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 - t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
} elmR = Math.floor(elmR);
elmG = Math.floor(elmG);
elmB = Math.floor(elmB); clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16); elmH = elmH + rate;
if (elmH >= 360)
elmH = 0; return clrRGB;
}
</script><a href="link.htm" target="_blank">链接效果</a>
<head>
<style>
.blendTrans{filter:alpha(opacity=30) blendTrans(duration=1)}
</style>
<script>
function over(){
with(event.srcElement.filters){
blendTrans.apply();
alpha.opacity=100;
blendTrans.play();
}
}function out(){
with(event.srcElement.filters){
blendTrans.apply();
alpha.opacity=20;
blendTrans.play();
}
}
</script>
</head><a href=# class="blendTrans" onmouseover="over()" onmouseout="out()">aaaaa</a>
--------------------------------
不知道哪里有错误!???
<p onmousemove="hello()">这个也很酷哦</p>
<p><script language="VBScript">
sub hello
document.fgColor=int(256*256*256*rnd)
end sub
</script></p>
文件名 :Link.HTC
功能 :链接的亮度渐变过程系统要求:IE 5.0 or later
历史记录:操作 作者 时间
建立 美洲豹 2002/5/3
-----------------------------------------------------------------------
-->
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH onevent="domouseover()" event="onmouseover"/>
<PUBLIC:ATTACH onevent="domouseout()" event="onmouseout"/>
</PUBLIC:COMPONENT>
<script language="JScript">
element.runtimeStyle.color="#000000";
//初始化 使用比较深的颜色,初始的时候亮度先变暗
var startColor = 0x000000; //开始颜色
var endColor = 0xff0000; //结束颜色
var v = startColor;
var step = 0x0f0000;
var fadeId=null;
function domouseover()
{
step=0x0f0000;
if(fadeId) clearTimeout(fadeId);
fade();
}
function domouseout()
{
step=0x0f0000;
if(fadeId) clearTimeout(fadeId);
fade1();
}
function fade()
{
if(v<=endColor){
v+=step;
element.runtimeStyle.color = v;
fadeId=setTimeout(fade,2);
}
}
function fade1()
{
if(v>=startColor){
v-=step;
element.runtimeStyle.color = v;
fadeId=setTimeout(fade1,50);
}
}</script>HTML文件
<style>
.richLink{
text-decoration : none;
color:black;
cursor:hand;
behavior:url(htc/link.htc);
font-family : 宋体;
font-size:9pt;
}
</style><span class="richLink">链接文字</span>