| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 539 人关注过本帖
标题:〓求助〓请问JS怎么插入透明flash,然后定位?
取消只看楼主 加入收藏
webgood
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-10-31
收藏
 问题点数:0 回复次数:0 
〓求助〓请问JS怎么插入透明flash,然后定位?

我怎改都是错,我不懂,请问有高手指点吗?代码如下,我只想要红色内容的功能,请问如何实现呢?
rnd.today=new Date();

rnd.seed=rnd.today.getTime();

function rnd() {

    rnd.seed = (rnd.seed*9301+49297) % 233280;

    return rnd.seed/(233280.0);

}

function rand(number) {

    return Math.ceil(rnd()*number);

}
function gainoverflash(wid,hei,gnt,gnl,gnurl)
{
Mlogo.innerHTML+="<embed src='"+gnurl+"' width='"+wid+"' height='"+hei+"' wmode='transparent' style='position:absolute;top:"+gnt+";left:"+gnl+"'></embed>"
}
function gainoverpic(wid,hei,gnt,gnl,gnurl,gnz)
{
Mlogo.innerHTML+="<div style='position:absolute;top:"+gnt+";left:"+gnl+";z-index:"+gnz+";'><img src='"+gnurl+"' width='"+wid+"' height='"+hei+"'></img></div>"
}
function gnflower(rurl,furl,gnum,burl,SunPot, LovPot, RaiPot, NurPot)
{
var str= '<table width="194" height="170" border="0" cellpadding="0" cellspacing="0" background="'+burl+'">'
str+='<tr><td rowspan="3">&nbsp;</td>'
str+='<td width="27" height="42" align="center" valign="bottom"><img src="http://imgcache.qq.com/qzone/client/icon_ft.gif" width="27" height="5"></td>'
str+='<td width="6" rowspan="3">&nbsp;</td>'
str+='<td width="27" align="center" valign="bottom"><img src="http://imgcache.qq.com/qzone/client/icon_ft.gif" width="27" height="5"></td>'
str+='<td width="6" rowspan="3">&nbsp;</td>'
str+='<td width="27" align="center" valign="bottom"><img src="http://imgcache.qq.com/qzone/client/icon_ft.gif" width="27" height="5"></td>'
str+='<td width="6" rowspan="3">&nbsp;</td>'
str+='<td width="27" align="center" valign="bottom"><img src="http://imgcache.qq.com/qzone/client/icon_ft.gif" width="27" height="5"></td>'
str+='<td rowspan="3">&nbsp;</td></tr><tr>'
str+='<td width="27" height="80" align="center" valign="bottom" background="http://imgcache.qq.com/qzone/client/icon_fm.gif" title="阳光:'+SunPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_f1.gif" width="27" height="'+(((SunPot>200)?200:SunPot)/2)*0.8+'"></td>'
str+='<td width="27" align="center" valign="bottom" background="http://imgcache.qq.com/qzone/client/icon_fm.gif" title="爱心:'+LovPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_f2.gif" width="27" height="'+(((LovPot>200)?200:LovPot)/2)*0.8+'"></td>'
str+='<td width="27" align="center" valign="bottom" background="http://imgcache.qq.com/qzone/client/icon_fm.gif" title="雨露:'+RaiPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_f3.gif" width="27" height="'+(((RaiPot>200)?200:RaiPot)/2)*0.8+'"></td>'
str+='<td width="27" align="center" valign="bottom" background="http://imgcache.qq.com/qzone/client/icon_fm.gif" title="营养:'+NurPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_f4.gif" width="27" height="'+(((NurPot>200)?200:NurPot)/2)*0.8+'"></td></tr><tr>'
str+='<td width="27" height="21" align="center" valign="top" title="阳光:'+SunPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_fd.gif" width="27" height="5"><img src="http://imgcache.qq.com/qzone/client/icon_b1.gif" width="16" height="16"></td>'
str+='<td width="27" align="center" valign="top" title="爱心:'+LovPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_fd.gif" width="27" height="5"><img src="http://imgcache.qq.com/qzone/client/icon_b2.gif" width="16" height="16"></td>'
str+='<td width="27" align="center" valign="top" title="雨露:'+RaiPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_fd.gif" width="27" height="5"><img src="http://imgcache.qq.com/qzone/client/icon_b3.gif" width="16" height="16"></td>'
str+='<td width="27" align="center" valign="top" title="营养:'+NurPot+'"><img src="http://imgcache.qq.com/qzone/client/icon_fd.gif" width="27" height="5"><img src="http://imgcache.qq.com/qzone/client/icon_b4.gif" width="16" height="16"></td>'
str+='</tr><tr><td width="49">&nbsp;</td>'
str+='<td colspan="7" align="center" valign="top"><font color="#000000">'
switch (parseInt(gnum)){
case 0:
str+='花匠学徒';
break;
case 1:
str+='花匠学徒';
break;
case 2:
str+='高级花匠';
break;
case 3:
str+='花匠大师';
break;
case 4:
str+='花之圣手';
break;
case 5:
str+='花之神匠';
break;
}
str+='</font><a href="http://q-zone.qq.com/web/?url=http://q-zone.qq.com/web/help/help_18.shtml#111" target="_blank"><img src="http://imgcache.qq.com/qzone/client/bt_help.gif" hspace="2" alt="帮助" border="0" align="absmiddle"></a></td>'
str+='<td width="19">&nbsp;</td></tr></table>'
Mlogo.innerHTML+="<div id='gnck' style='position:absolute;top:470;left:720;z-index:1004;'></div><div id='gnban' style='position:absolute;top:480;left:731;z-index:1002;'></div>"
document.getElementById('gnban').innerHTML=str;
document.getElementById('gnck').innerHTML="<table border=0 cellspacing=0 cellpadding=0 onmouseover=this.style.cursor=\'hand\';><tr><td onclick=gnhide(); align=center><img src=http://yuayus.cwsurf.de/img/tansfer.gif border=0 width=92 height=178></td></tr></table>"

gainoverpic('868','60','605','10',rurl,'1001');
gainoverpic('75','100','383','715','http://imgcache.qq.com/qzone/mall/guo_5.gif','1001');
gainoverpic('92','178','471','710',furl,'1003');

}
function gnhide()
{
document.getElementById('gnban').style.display=(document.getElementById('gnban').style.display)?'':'none'
}
gainoverflash('150','162','300','760','http://219.131.221.186:7474/mtv/tiao.swf');
var n=rand(5);
function gnrndf()
{
if (n==1)
{
gnflower
('http://imgcache.qq.com/qzone/item/orig/12/2364_r5.gif','http://imgcache.qq.com/qzone/item/orig/12/2364_f5.gif','5','http://imgcache.qq.com/qzone/item/orig/12/2364_bg.gif','999','999','999','999')
}
else if (n==2)
{
gnflower('http://imgcache.qq.com/qzone/item/orig/5/2469_r5.gif','http://imgcache.qq.com/qzone/item/orig/5/2469_f5.gif','5','http://imgcache.qq.com/qzone/item/orig/5/2469_bg.gif','999','999','999','999')
}
else if (n==3)
{
gnflower('http://imgcache.qq.com/qzone/item/orig/11/2363_r5.gif','http://imgcache.qq.com/qzone/item/orig/11/2363_f5.gif','5','http://imgcache.qq.com/qzone/item/orig/11/2363_bg.gif','999','999','999','999')
}
else if (n==4)
{
gnflower('http://imgcache.qq.com/qzone/item/orig/10/2362_r5.gif','http://imgcache.qq.com/qzone/item/orig/10/2362_f5.gif','5','http://imgcache.qq.com/qzone/item/orig/10/2362_bg.gif','999','999','999','999')
}
else if (n==5)
{
gnflower('http://imgcache.qq.com/qzone/item/orig/1/2161_r5.gif','http://imgcache.qq.com/qzone/item/orig/1/2161_f5.gif','5','http://imgcache.qq.com/qzone/item/orig/1/2161_bg.gif','999','999','999','999')
}
}
gnrndf();

[此贴子已经被作者于2005-10-31 9:51:49编辑过]

搜索更多相关主题的帖子: flash 
2005-10-31 09:49
快速回复:〓求助〓请问JS怎么插入透明flash,然后定位?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.055576 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved