呼呼~~,累死我了,看看是不是你想要的<script>
var thefont
var i=0,j=0
var thefonts=new Array()
function showit(obj){
thefont=obj
e=event.srcElement
t=e.offsetTop;
l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;}
tips.style.display=""
tips.style.left=l+event.srcElement.offsetWidth
tips.style.top=t+event.srcElement.offsetHeight
expan()
}
function hideit(){
tips.style.display="none"
tips.style.width=0
tips.style.height=0
tips.innerHTML=""
i=0
j=0
}
function showmessage(){
thefonts=thefont.split("")
addfont()
}
function addfont(){
if(j<thefonts.length){
tips.innerHTML="<font color=black>"+tips.innerText+"</font><font color=white>"+thefonts[j]+"</font>"
setTimeout("addfont()",50)
}
j++
}
function expan(objs){
if(i<150){
tips.style.width=i*2
tips.style.height=i*1
setTimeout("expan()",10)
}
else
if(i==150)
showmessage()
i++
}
</script>
<style type=text/css>
a {font-size:14px;color:#666666;font-family:"tahoma";text-decoration: none}
span{font-size:12px;color:black;font-family:Verdana;border:1 solid gray}
</style>
<a href="#" onmouseover="showit('123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123.')" onmouseout=hideit()>123</a>
<span id=tips style="position:absolute;width:0px;height:0px;background:#cccccc;display:none;filter: Alpha(opacity=60)"></span>
var thefont
var i=0,j=0
var thefonts=new Array()
function showit(obj){
thefont=obj
e=event.srcElement
t=e.offsetTop;
l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;}
tips.style.display=""
tips.style.left=l+event.srcElement.offsetWidth
tips.style.top=t+event.srcElement.offsetHeight
expan()
}
function hideit(){
tips.style.display="none"
tips.style.width=0
tips.style.height=0
tips.innerHTML=""
i=0
j=0
}
function showmessage(){
thefonts=thefont.split("")
addfont()
}
function addfont(){
if(j<thefonts.length){
tips.innerHTML="<font color=black>"+tips.innerText+"</font><font color=white>"+thefonts[j]+"</font>"
setTimeout("addfont()",50)
}
j++
}
function expan(objs){
if(i<150){
tips.style.width=i*2
tips.style.height=i*1
setTimeout("expan()",10)
}
else
if(i==150)
showmessage()
i++
}
</script>
<style type=text/css>
a {font-size:14px;color:#666666;font-family:"tahoma";text-decoration: none}
span{font-size:12px;color:black;font-family:Verdana;border:1 solid gray}
</style>
<a href="#" onmouseover="showit('123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123.')" onmouseout=hideit()>123</a>
<span id=tips style="position:absolute;width:0px;height:0px;background:#cccccc;display:none;filter: Alpha(opacity=60)"></span>
还有一个效果是一开始的时候是一个图片,有了邮件以后就触发由开始的图片改了另一个图片,然后提示使用者有邮件到,然后才到我们现在完成的效果啊。
=========这还用动手吗?有邮件的时候改变图片的src,并弹出对话框提示邮件到,再执行我上面的代码。
<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=black>"+str.slice(0,bor).replace(/©/g,'<br>')+"</font>"+"<font color=red>"+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" id="MailObjBox"><div style="width:100%;height:100" id="MailObj">a</div></div>
下面这个
==============================
<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=black>"+str.slice(0,bor).replace(/※/g,'<br>')+"</font>"+"<font color=red>"+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" id="MailObjBox"><div style="width:100%;height:100" id="MailObj">a</div></div>
有分么?
对了
结帖区有一个是倒分帖
http://www.csdn.net/Expert/TopicView1.asp?id=1063365
hui_feng(盘桃2) ,我明白,我的意思是你尽量多动手.希望你早日修成正果:)
看来 lanbor(兰波) 有兴致一试身手了 :-P
还没有解决呀,这个发mail的东西你需要做成什么样呀?
不明白
dylanOK(岱岚)
呵呵,你误会了,我说的是这个帖子有分么~
我的可用分还有那么多,只是专家分太少了,(没有时间来这里)
用什么着的?
pf~
说51上那贴子是“很有意思的效果”倒也过得去,这里这个
要收要发,得配合服务器啊,已经是一个比较完整的功能了...不是一下子弄得好的,而且一般需要邮箱支持pop3,否则没法收.
function ObjOver(obj,even){
docbox.style.display="";
doc.innerHTML="";
bor=0;
ChS(obj);
function even.onmouseout(){
docbox.style.display="none";
docbox.style.width="0";
docbox.style.height="0";
clearTimeout(x);
clearTimeout(y);
}
}
function ChS(obj){
if(docbox.style.pixelWidth<200){docbox.style.pixelWidth+=2;docbox.style.pixelHeight++;x=setTimeout("ChS('"+obj+"')",1);
}
else{
str=obj;WrS();
}
}
function WrS(){
doc.innerHTML="<font color=#666666>"+str.slice(0,bor).replace(/&/g,'<br>')+"</font>";
if(bor<str.length){
doc.innerHTML="<font color=#666666>"+str.slice(0,bor).replace(/&/g,'<br>')+"</font>"+"<font color=#666666>_</font>";
bor++;
y=setTimeout(WrS,50);
}
}把上面的一个稍微改了一点点,可能好些。
里面的/&/g是正则表达式吗? 最后的那个g是什么用的。好象没有就不行。
var thefont
var i=0,j=0
var thefonts=new Array()
function showit(obj){
thefont=obj
e=event.srcElement
t=e.offsetTop;
l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;}
tips.style.display=""
tips.style.left=l+event.srcElement.offsetWidth
tips.style.top=t+event.srcElement.offsetHeight
expan()
}
function hideit(){
tips.style.display="none"
tips.style.width=0
tips.style.height=0
tips.innerHTML=""
i=0
j=0
}
function showmessage(){
thefonts=thefont.split("")
addfont()
}
function addfont(){
if(j<thefonts.length){
tips.innerHTML="<font color=black>"+tips.innerText+"</font><font color=white>"+thefonts[j]+"</font>"
setTimeout("addfont()",50)
}
j++
}
function expan(objs){
if(i<150){
tips.style.width=i*2
tips.style.height=i*1
setTimeout("expan()",10)
}
else
if(i==150)
showmessage()
i++
}
</script>
<style type=text/css>
a {font-size:14px;color:#666666;font-family:"tahoma";text-decoration: none}
span{font-size:12px;color:black;font-family:Verdana;border:1 solid gray}
</style>
<a href="#" onmouseover="showit('123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123.')" onmouseout=hideit()>123</a>
<span id=tips style="position:absolute;width:0px;height:0px;background:#cccccc;display:none;filter: Alpha(opacity=60)"></span>
我倒,居然把人家要求的换行去掉了,还说稍微好点
~~^_^
<a href="#" onmouseover=turn()>123</a>
在<script>里面添加了:
var temp=0turn(){
if(temp==0){
showit("123 123 123 123 123 123 .");
temp=1;
}else{
hideit();
temp=0;
}
}
这样在查看的时候就不会出现上述问题!