Wednesday, 11 December 2013

Introduction to Javascript

Introduction to JavaScript
Welcome to first JavaScript tutorials from Extra tutorials. Now who does not have any idea about what is JavaScript is JavaScript is basically scripting language use to make web pages more interactive. So, for example if we have a webpage and you may be want to add calculator on it or you may be want to put quiz on it or may be you want just navigation bar or some cool roller banners in order to do this you need to use special language called JavaScript.
For Working with JavaScript you need couple of things first notepad editor in this tutorials of JavaScript i am going to use notepad++ its free if you want download from Google another thing you guys need is knowledge of xhtml. Its basic how does not know who to make basic webpages must learn html as well as xhtml first. Once You had that both things then welcome to the world of JavaScript.
Code for Introduction to JavaScript (Screenshot1):-
Introduction to javascript
Introduction to javascript (Screenshot1)
1
<br /><br />&lt;script type="text/Javascript"&gt;// &lt;![CDATA[<br />document.write("hey now brown cow");<br />// ]]&gt;&lt;/script&gt;<br /><br />
Output (Screenshot2) :-
Introduction to javascript
Introduction to javascript (Screenshot2)
JavaScript is something that you add to webpages in order to make it more inner active. So, Just like every thing else in xhtml you need to add JavaScript through the use of tags. Now tags for JavaScript is < script type=”text/Javascript” >. In the internet there are lot of different scripting languages are there which you can add into webpages actually there are 50 different type ofscripting languages is there and JavaScript is of them. When browser comes across the code we need to tell that we are going to work with JavaScript  So, in order to tell our browser that we need to give attribute to script tags called type in this equal to text slashes JavaScript. And also we need to add ending script tags </script>. In between this tags where you can be typing all of your JavaScript code. Copy this example and just check in your browser whether JavaScript runs. As you can see output JavaScript is working in my browser. As this sentence pop-out in your browser that means your browser runs JavaScript  If not you must fix browser JavaScript support. There are lot of browser just not understand JavaScript they only understand html codes and when ever they come to codes of JavaScript they think what the hack this is. If you had older browser and which can not understand what JavaScript is therefore check whether your browser supports JavaScript.

No comments:

Post a Comment