PDA

View Full Version : want to print each character of varialble one by one



s_sameer
09-29-2004, 02:34 AM
hello to all,
<script langauge=javascript>
var sno="1334";

document.write(sno+"<hr>");

var lstr=sno.length;
document.write(lstr+"<hr>");

document.write(lstr.snos(1));
</script>


i want to print each character of variable "sno" one by one
i.e. 1,3,3,4 or
1<br>
3<br>
3<br>
4

can you help me inthis

Thanx Sameer

gigabites
09-29-2004, 04:01 AM
var sno = '1234';
for (var i = 0 ; i < sno.length ; i++)
{
document.write(sno.charAt(i) + "<br>");
}You mean like that? :)

s_sameer
09-29-2004, 06:57 AM
:) thanx ..

actualy i wanted to show some no.. in score board like effect and it has to be realtime that isconnected with database..

so using with cod givenby u i will split the no. and disply the correspondng image to get image effect ..

any ways thanx a lot
sameer