彩信编辑器之预览功能
html代码
<table width="200" height="250" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
<tr>
<td align="center" valign="middle">
<marquee id="MMScreen" align="left" behavior="scroll" bgcolor="#ffffff" direction="up" height="208" width="176" loop="-1" scrollamount="5" scrolldelay="100">
我是彩信内容《铁臂阿童木》
<br>
<br>
<img src="png-074jpg.jpg"/>
<br>
恭喜鼠年发财啦啦!
</marquee>
</td>
</tr>
</table>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><input type="button" value="前 移" onMouseOver="backwards()" onMouseOut="stoproll()"></td>
<td align="center"><input type="button" value="后 移" onMouseOver="frontad()" onMouseOut="stoproll()"></td>
</tr>
</table>
<script language="javascript">
function frontad()
{
var mms=document.all.MMScreen;
mms.direction="up";
mms.start();
}
function backwards()
{
var mms=document.all.MMScreen;
mms.direction="down";
mms.start();
}
function stoproll()
{
if(runflag==0)
{
var mms=document.all.MMScreen;
mms.stop();
}
}
var runflag=4;
function runYourTimes()
{
if(runflag>0)
{
runflag--;
setTimeout("runYourTimes()",1000);
}
else
{
var mms=document.all.MMScreen;
mms.stop();
}
}
runYourTimes();
</script>
<tr>
<td align="center" valign="middle">
<marquee id="MMScreen" align="left" behavior="scroll" bgcolor="#ffffff" direction="up" height="208" width="176" loop="-1" scrollamount="5" scrolldelay="100">
我是彩信内容《铁臂阿童木》
<br>
<br>
<img src="png-074jpg.jpg"/>
<br>
恭喜鼠年发财啦啦!
</marquee>
</td>
</tr>
</table>
<table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><input type="button" value="前 移" onMouseOver="backwards()" onMouseOut="stoproll()"></td>
<td align="center"><input type="button" value="后 移" onMouseOver="frontad()" onMouseOut="stoproll()"></td>
</tr>
</table>
<script language="javascript">
function frontad()
{
var mms=document.all.MMScreen;
mms.direction="up";
mms.start();
}
function backwards()
{
var mms=document.all.MMScreen;
mms.direction="down";
mms.start();
}
function stoproll()
{
if(runflag==0)
{
var mms=document.all.MMScreen;
mms.stop();
}
}
var runflag=4;
function runYourTimes()
{
if(runflag>0)
{
runflag--;
setTimeout("runYourTimes()",1000);
}
else
{
var mms=document.all.MMScreen;
mms.stop();
}
}
runYourTimes();
</script>
效果:
-----------------------------------------------------------------