0
Is this script correct?
alert("This is an alert box!"); <script type=“text/javascript"> document.write(“Hello world <br/>”); document.write(“Goodbye world”) Please tell me im new
2 ответов
+ 7
Also, in HTML 5, the default script type is Javascript, so you can just drop the type attribute for cleaner code.
+ 6
The alert should be placed inside the script tag, and you seem to forget to close the script tag with its pairing </script>. And a semicolon after the "Goodbye world".
<script type=“text/javascript">
alert("This is an alert box!");
document.write(“Hello world <br/>”);
document.write(“Goodbye world”);
</script> <!-- You forgot this -->
Hth, cmiiw