弹出半透明层且显打字效果
时间:2007-02-17 来源:PHP爱好者
<body>
<input type="button" onmouseover="ObjOver('abcdef※gheightabcdef※gheightabcdef※gheightabcdef※gheightabcdef※gheight',this)">
<script language="JScript">
var str="",bor=0;
function ObjOver(obj,even){
MailObjBox.style.display="";
MailObj.innerHTML="";
bor=0;
ChS(obj);
function even.onmouseout(){
MailObjBox.style.display="none";
MailObjBox.style.width="0";
MailObjBox.style.height="0";
}
}
function ChS(obj){
if(MailObjBox.style.pixelWidth<200){MailObjBox.style.pixelWidth+=2;MailObjBox.style.pixelHeight++;setTimeout("ChS('"+obj+"')",5);
}
else{str=obj;WrS();
}
}
function WrS(){
if(bor<str.length){
MailObj.innerHTML="<font color=#000000>"+str.slice(0,bor).replace(/※/g,'<br>')+"</font>"+"<font color=#ffffff>"+str.slice(bor,bor+1).replace(/※/g,'<br>')+"</font>";
bor++;
setTimeout(WrS,100);
}
}
</script>
<div style="position:absolute;width:0;height:0;border:1 solid black;background:#cccccc;font-size:9pt;display:none;overflow:hidden;filter:alpha(opacity=80)" id="MailObjBox"><div style="width:100%;height:100" id="MailObj">a</div></div>
php爱好者站 http://www.phpfans.net Linux|Apache|IIS.
<input type="button" onmouseover="ObjOver('abcdef※gheightabcdef※gheightabcdef※gheightabcdef※gheightabcdef※gheight',this)">
<script language="JScript">
var str="",bor=0;
function ObjOver(obj,even){
MailObjBox.style.display="";
MailObj.innerHTML="";
bor=0;
ChS(obj);
function even.onmouseout(){
MailObjBox.style.display="none";
MailObjBox.style.width="0";
MailObjBox.style.height="0";
}
}
function ChS(obj){
if(MailObjBox.style.pixelWidth<200){MailObjBox.style.pixelWidth+=2;MailObjBox.style.pixelHeight++;setTimeout("ChS('"+obj+"')",5);
}
else{str=obj;WrS();
}
}
function WrS(){
if(bor<str.length){
MailObj.innerHTML="<font color=#000000>"+str.slice(0,bor).replace(/※/g,'<br>')+"</font>"+"<font color=#ffffff>"+str.slice(bor,bor+1).replace(/※/g,'<br>')+"</font>";
bor++;
setTimeout(WrS,100);
}
}
</script>
<div style="position:absolute;width:0;height:0;border:1 solid black;background:#cccccc;font-size:9pt;display:none;overflow:hidden;filter:alpha(opacity=80)" id="MailObjBox"><div style="width:100%;height:100" id="MailObj">a</div></div>
php爱好者站 http://www.phpfans.net Linux|Apache|IIS.
相关阅读 更多 +