Tuesday, 15 October 2013

JavaScript Code Sysntax

If you have got ever used CSS before, you'll notice the total half regarding as well as JavaScript are lots easier to understand. Here necessary steps you ought to perpetually follow once making or mistreatment somebody else's JavaScript code:


  • Use the script tag to inform the browser you're mistreatment JavaScript.
  • Write or transfer some JavaScript
  • Test the script!

There are such a lot of various things that may get it wrong with a script, be it human error, browser compatibility problems, or software package variations. So, once mistreatment JavaScript, take care that you simply take a look at your script out on a large sort of systems and most significantly, on completely different internet browsers.

Your Initial Javascript:
To follow the classic samples of several programming tutorials, let's use JavaScript to print out "Hello World" to the browser. i do know this is not terribly attention-grabbing, however it'll be a decent thanks to make a case for all the overhead needed to try and do one thing in JavaScript.

<html>
<body>
<script type="text/JavaScript">

document.write("Hello World!")

</script>
</body>
</html>

Output:
Hello World! 


No comments:

Post a Comment