MySQL beginner |
|
Ik wil voor mijn nieuwssysteem een nieuws ticker.
Ik heb nu de volgende code, maar hoe kan ik nu automatisch de laatste 5 titels laten weergeven in de ticker.
Dit staat tussen de <head> </head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function NEWS()
{
setTimeout("document.news.news.value = ('1')",1900)
setTimeout("document.news.news.value = ('2')",2900)
setTimeout("document.news.news.value = ('3')",3900)
setTimeout("document.news.news.value = ('4')",4900)
setTimeout("document.news.news.value = ('5')",5900)
setTimeout("document.news.news.value = ('6')",6900)
setTimeout("document.news.news.value = ('7')",7900)
setTimeout("document.news.news.value = ('8')",8900)
setTimeout("NEWS()",9900)
}
NEWS()
// -->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript"> <!-- function NEWS() { setTimeout("document.news.news.value = ('1')",1900) setTimeout("document.news.news.value = ('2')",2900) setTimeout("document.news.news.value = ('3')",3900) setTimeout("document.news.news.value = ('4')",4900) setTimeout("document.news.news.value = ('5')",5900) setTimeout("document.news.news.value = ('6')",6900) setTimeout("document.news.news.value = ('7')",7900) setTimeout("document.news.news.value = ('8')",8900) setTimeout("NEWS()",9900) } NEWS() // --> </SCRIPT>
En dit tussen de <body> </body>
<FORM NAME="news">
<INPUT TYPE="TEXT" NAME="news" SIZE="30">
</FORM>
<FORM NAME="news"> <INPUT TYPE="TEXT" NAME="news" SIZE="30"> </FORM>
|