Monday, 2 September 2013

about javascript comment specification

about javascript comment specification

Like below code, '<!--' immediate codes don't execute. In case of adding
line break after '<!--', execute well. Is this specification for
javascript?
<html>
<body>
<script type="text/javascript">
<!--document.write("TEST1"); // <- don't execute. In case of adding line
break, execute well.
document.write("TEST2");
//-->
</script>
</body>
</html>

No comments:

Post a Comment