<html>
<head>
<title>效果测试</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body{font-size:14px;font-weight:bold;}
</style>
</head>
<body>
最新内容:<a id="HotNews" href="" target="_blank"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
var NewsTime = 2000; //每条文字的停留时间
var TextTime = 50; //新闻标题文字出现等待时间,越小越快var newsi = 0;
var txti = 0;
var txttimer;
var newstimer;var newstitle = new Array(); //文字
var newshref = new Array(); //无所谓啦newstitle[0] = "你好";
newshref[0] = "你好吗?";newstitle[1] = "很好";
newshref[1] = "真的很好";newstitle[2] = "china boys 。";
newshref[2] = "how are有?";newstitle[3] = "试试";
newshref[3] = "试试就试试";newstitle[4] = "bye";
newshref[4] = "哈哈哈";function shownew()
{
//code by haiwa @2005-10-21 www.51windows.net
var endstr = "_"
hwnewstr = newstitle[newsi];
newslink = newshref[newsi];
if(txti==(hwnewstr.length-1)){endstr="";}
if(txti>=hwnewstr.length){
clearInterval(txttimer);
clearInterval(newstimer);
newsi++;
if(newsi>=newstitle.length){
newsi = 0
}
newstimer = setInterval("shownew()",NewsTime);
txti = 0;
return;
}
clearInterval(txttimer);
document.getElementById("HotNews").href=newslink;
document.getElementById("HotNews").innerHTML = hwnewstr.substring(0,txti+1)+endstr;
txti++;
txttimer = setInterval("shownew()",TextTime);
}
shownew();
//-->
</SCRIPT>
<p><a href="http://www.baidu.com" target="_blank">baidu一下</a></p>
</body>
</html>怎样让下面的文字显示出来替换为图片?
<img src="http://csdnimg.cn/www/images/csdnindex_logo.gif" width="159" height="54" />怎么替换?newstitle[0] = "你好";
newshref[0] = "你好吗?";newstitle[1] = "很好";
newshref[1] = "真的很好";newstitle[2] = "china boys 。";
newshref[2] = "how are有?";newstitle[3] = "试试";
newshref[3] = "试试就试试";newstitle[4] = "bye";
newshref[4] = "畜生王八蛋";