PHP gevorderde |
|
Weet iemand hoe ik deze code moet veranderen zodat de tekst niet in een field wordT gegeven maar gewoon als tekst en dan scrolt?
Code zelf:
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
var timerID = null;
var timerRunning = false;
var id,pause=0,position=0;
function ticker()
{
var i,k,msg="Welkom bij de vernieuwde <strong>Zwobbel</strong> [Rebuild v1.0] website !!!";
k=(75/msg.length)+1;
for(i=0;i<=k;i++) msg+=" "+msg;
document.lichtkrant1.veld1.value=
msg.substring(position,position+95);
if(position++==38) position=0;
id=setTimeout("ticker()",1000/10);
}
function action()
{
if(!pause) {
clearTimeout(id);
pause=1; }
else {
ticker();
pause=0; }
}
//-->
</SCRIPT>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> <!-- var timerID = null; var timerRunning = false; var id,pause=0,position=0; function ticker() { var i,k,msg="Welkom bij de vernieuwde <strong>Zwobbel</strong> [Rebuild v1.0] website !!!"; k=(75/msg.length)+1; for(i=0;i<=k;i++) msg+=" "+msg; document.lichtkrant1.veld1.value= msg.substring(position,position+95); if(position++==38) position=0; id=setTimeout("ticker()",1000/10); } function action() { if(!pause) { clearTimeout(id); pause=1; } else { ticker(); pause=0; } } //--> </SCRIPT>
Code weergave:
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
document.write('<DIV ALIGN="center" NAME="lichtkrant1">');
document.write('<FORM NAME="lichtkrant1" ACTION="geen_actie">');
document.write('<INPUT TYPE="text" NAME="veld1" SIZE="50">');
document.write('<\/FORM>');
document.write('<\/DIV>');
ticker()
//-->
</SCRIPT>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> <!-- document.write('<DIV ALIGN="center" NAME="lichtkrant1">'); document.write('<FORM NAME="lichtkrant1" ACTION="geen_actie">'); document.write('<INPUT TYPE="text" NAME="veld1" SIZE="50">'); document.write('<\/FORM>'); document.write('<\/DIV>'); ticker() //--> </SCRIPT>
|