有文字“首页”当鼠标经过的时候,变成粗体“首页”,离开的时候,变回原样。
请问怎么弄?
<script>
//爆裂代码
var x_step=new Array();
var y_step=new Array();
var x_randompos=new Array();
var y_randompos=new Array();
var x_startpos=0;
var y_startpos=0;
var x_slices=8;
var y_slices=3;
var width_slice=0;
var height_slice=0;
var spancounter=0;
var pause=10;
var max_loop=20;
var i_loop=0;function explode_init(f)
{
spancounter=0;
if (f.all) {
for (i=0;i<=y_slices-1;i++) {
for (ii=0;ii<=x_slices-1;ii++) {
f.write(\"<span id='span\"+spancounter+\"' style='POSITION: absolute;display: ;'></span>\");
spancounter++
}
}
spancounter=0;
}
}function explode_start(obj)
{
var f=wog_view.document;
var img = f.getElementById(obj);//eval(\"parent.wog_view.document.\"+obj);
width_slice=Math.floor(img.width/x_slices);
height_slice=Math.floor(img.height/y_slices);
if(img.style.left.search(\"%\")==-1)
{
x_startpos = img.style.posLeft;
}
else
{
x_startpos = (f.body.offsetWidth-20) * (img.style.posLeft)/100;
}if(img.style.top.search(\"%\")==-1)
{
y_startpos = img.style.posTop;
}
else
{
y_startpos = (f.body.offsetHeight - 5) * img.style.posTop/100;
}
cliptop=0;
clipbottom=height_slice;
clipleft=0;
clipright=width_slice;
i_loop=0;spancounter=0;
for (i=0;i<=y_slices-1;i++) {
for (ii=0;ii<=x_slices-1;ii++) {
x_randompos[spancounter] = Math.ceil(f.body.offsetWidth*Math.random());
y_randompos[spancounter] = Math.ceil(f.body.offsetHeight*Math.random());
var thisinnerspan=f.getElementById(\"span\"+spancounter);
thisinnerspan.innerHTML=\"<img id='spimg\"+spancounter+\"' src='\"+img.src+\"' style='FILTER: alpha(opacity=100);'>\"
thisinnerspan.style.posLeft = x_startpos;
thisinnerspan.style.posTop = y_startpos;
thisinnerspan.style.clip = \"rect(\"+cliptop+\" \"+clipright+\" \"+clipbottom+\" \"+clipleft+\")\";
clipleft+=width_slice;
clipright+=width_slice;
spancounter++;
}
clipleft=0
clipright=width_slice
cliptop+=height_slice
clipbottom+=height_slice
}
spancounter=0;img.style.display = \"none\";
explode_IE(f);
}function explode_IE(f) {
spancounter=0;for (i=0;i<=y_slices-1;i++) {
for (ii=0;ii<=x_slices-1;ii++) {
try{
var thisspan=f.getElementById(\"span\"+spancounter).style;
x_step[spancounter]=(x_randompos[spancounter]-thisspan.posLeft)/(max_loop);
y_step[spancounter]=(y_randompos[spancounter]-thisspan.posTop)/(max_loop);
thisspan.posLeft+=x_step[spancounter];
thisspan.posTop+=y_step[spancounter];
var eimg = f.getElementById(\"spimg\"+spancounter);
eimg.filters.alpha.opacity = (eimg.filters.alpha.opacity-100/(max_loop));
spancounter++;
if(max_loop==i_loop) thisspan.display = \"none\";
}catch(e){}
}
}
i_loop++;spancounter=0;
if(max_loop>=i_loop) var timer=setTimeout(\"explode_IE(parent.wog_view.document)\",pause);
}
//爆裂代码结束
</script><form id=\"wog_view\">
<img id=\"img\" src=\"http://bbs.bc-cn.net/aaa/logo.gif\">
</form>
<script>
explode_init(wog_view.document);
explode_start(\"img\");
</script>
<html><head><title>aa</title>
<Meta content=revealTrans(Transition=14,Duration=3.0) http-equiv=Page-enter>
<style type="text/css">
div{
width:0px;
background:url(http://bbs.city597.com/upload/2006/11/08/150155.gif )
}
table{
letter-spacing:2px;
font-size:20px;
font-weight:100;
filter:mask(color=#000000)
}
</style>
</head><body bgcolor="#000000"><div><table border="0" cellpadding="0" cellspacing="0">
<tr><td id="aa">我是中国人</td></tr></table></div>
</body></html>
<form>
请输入:<input type="text" name="ab">
<input type="button" value="变成闪字" onclick="ss(ab.value)">
</form>
<script language="javascript">
function ss(a){
aa.innerText=a
}
</script>
[此贴子已经被作者于2007-7-13 12:35:59编辑过]