魔法表情演示代码大全

魔法表情演示代码大全

类似QQ上的魔法表情的代码,把下面的代码粘贴到文本里保存为Test.htm,打开就可以看到类似QQ中的魔法表情的画面~~

<style type="text/css">
<!--
.MagicFace
{
BORDER-RIGHT: #999 1px dashed;
PADDING-RIGHT: 5px;
BORDER-TOP: #999 1px dashed;
PADDING-LEFT: 5px; FLOAT: right;
PADDING-BOTTOM: 5px;
BORDER-LEFT: #999 1px dashed;
PADDING-TOP: 5px;
BORDER-BOTTOM: #999 1px dashed;
TEXT-ALIGN: center;
}
-->
</style>
<DIV class=magicface><IMG title=点击观看魔法表情 style="CURSOR: hand"

onclick="ShowMagicFace('mf_039');"

src="http://www.loveyuki.com/magicface/images/mf_039.gif" align=absMiddle><BR>魔法表情
</DIV>
<DIV id=MagicFace style="Z-INDEX: 99; VISIBILITY: hidden; POSITION: absolute"></DIV>
<SCRIPT language=JavaScript>
<!--
function MM_showHideLayers()
{
var i,p,v,obj,args=MM_showHideLayers.arguments;
obj=document.getElementById("MagicFace");
for (i=0; i<(args.length-2); i+=3)
if (obj)
{
v=args[i+2];
if (obj.style)
{
obj=obj.style;
v=(v=='show')?'visible':(v=='hide')?'hidden':v;
}
obj.visibility=v;
}
}

function ShowMagicFace(MagicID)
{
var MagicFaceUrl = "http://www.loveyuki.com/magicface/flash/" + MagicID + ".swf";
document.getElementById("MagicFace").innerHTML = '<object

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,2

9,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="350"><param

name="movie" value="'+ MagicFaceUrl +'"><param name="menu" value="false"><param

name="quality" value="high"><param name="play" value="false"><param name="wmode"

value="transparent"><embed src="' + MagicFaceUrl +'" wmode="transparent" quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" width="500" height="350"></embed></object>';
document.getElementById("MagicFace").style.top =

(document.body.scrollTop+((document.body.clientHeight-300)/2))+"px";document.getElementById

("MagicFace").style.left =

(document.body.scrollLeft+((document.body.clientWidth-480)/2))+"px";document.getElementById

("MagicFace").style.visibility = 'visible';MagicID +=

Math.random();setTimeout("MM_showHideLayers('MagicFace','','hidden')",8000);var NowMeID =

MagicID;
}

ShowMagicFace('mf_039');
-->
</SCRIPT>