Home
visit our sponsor
Dynamic HTML Main Page

Head Line News

 

Copy Code ด้านล่างไปใส่ไว้ในส่วนของ <Head>

<script language="JavaScript1.2">

var fontStyle;
var tickerContent=new Array();

fontStyle="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px";

tickerContent[0]='<font color="#FFFFFF"><a href="#">Intel เปิดตัว Pentium 5 ความเร็ว 100 GHZ</a></font>.';
tickerContent[1]='<font color="#FFFFFF"><a href="#">Microsoft Windows ตัวใหม่ ชื่อว่า "Windows ABCDEFGHIJKL"</a></font>.';
tickerContent[2]='<font color="#FFFFFF"><a href="#">ไวรัสคอมพิวเตอร์ตัวใหม่ ทำลายเคสให้พังได้</a></font>.';
// ใส่ Link และหัวข้อข่าวได้ตามต้องการ

var tickdelay=3000; //ความเร็วในการแสดงผล

var currentmessage=0;

function changeTickerContent()
{
if (document.layers)
{
document.layers['divTickerBG'].document.layers['divTicker'].document.write('<font style="'+fontStyle+'">'+tickerContent[currentmessage]+'</font>');
document.layers['divTickerBG'].document.layers['divTicker'].document.close();
}
else if (document.all)
{
divTicker.innerHTML='<font style="'+fontStyle+'">'+tickerContent[currentmessage]+'</font>';
}

if (currentmessage<tickerContent.length-1)
{
currentmessage++;
}
else
{
currentmessage=0;
}

setTimeout("changeTickerContent()",tickdelay);
}

// end
</script>

นำ Code นี้ไปวางไว้ภายใน Tag <body> <BODY onLoad=changeTickerContent()>

นำ Code ด้านล่างนี้ไปไว้ในบริเวณที่ต้องการให้แสดงหัวข้อข่าว

<!-- begin dHTML Simple Object -->
<div id="divTickerBG" style="position:absolute; width:
500 px; height:20 px; z-index:1; left: 0; top: 40; background-color: #33CC99; layer-background-color: #3300FF0; border: 1px none #0033FF">
<div id="divTicker" style="position:absolute; width:
500px; height:20px; z-index:2; left: 2px; top: 2px;">
</div>
</div>
<!-- end dHTML Simple Object -->

Top of PageBack to Previous Page

 
visit our sponsor
Free web template Learning Photoshop 6.0 Technic

Download Software Graphic webboard

Graphic and webdesign Links Website design service Contact Us