<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
<!--
var x = 26;
do{
document.write(x + " et voilà! <br />");
x++;
}while(x<32);
//-->
</script>
</body>
</html>
I don't know why the above code doesn't work. The browser window just keeps on loading and nothing appears. I can't even use F12 in Google Chrome to debug the code. I am not sure but I think that the problem lies with the (Dunno why, but the code started working. I am very, very sure that it wasn't working at first. Weird.) <br />
tag. <br>
and <br/ >
seem to work fine, but not <br />
and <br/>
. (Note the spaces). Shouldn't all four work properly?
Also when <br>
or <br/ >
are used the printed text is et voilà !
rather than et voilà!
Any thoughts?
` (e.g., if you want polyglot X/HTML5). – Brett Zamir Jul 12 '14 at 08:33