Presentation is loading. Please wait.

Presentation is loading. Please wait.

Javascript Short Introduction By Thanawat Varintree, 49540438.

Similar presentations


Presentation on theme: "Javascript Short Introduction By Thanawat Varintree, 49540438."— Presentation transcript:

1 Javascript Short Introduction By Thanawat Varintree,

2 About Javascript Javascript first designed in 1995.
Developed by Brendan Eich of Netscape. Design to let programmers control the behavior of software object. Most of web programmer known this well.

3 Contribution in Programming Language
Javascript definition includes extensive facilities for controlling and manipulating parts of web pages such as HTML. For Example (Basic alert box) : <html> <head><title> TITLE </title> <script> alert('HELLO WORLD'); </script> </head> <body></body> </html>

4

5 About Javascript(More)
More Example that use Javascript - Web stats - Back , Forward , Confirm button (script button) - Header alert - Right click prohibited - web Graphic - etc

6 About Javascript(More)
Javascript is used most widely in Web browsers whose software objects tend to represent a variety of HTML elements in a document and the document itself. Easy for new programmer to learn and use

7 Example <script> // start javascript
// javascript run script --- > top to bottom var a = 1; // global variable a b = 30; // global variable b (same as var b) // var is javascript variable that can store any value // in it (Number , String , Array , Object , etc) var c = a + b; // c = a + b alert('c value is ' + c); // alert c on screen; c++; // c = c + 1 alert(c); // alert c on screen; c = 10; document.write('Hello World!'); // write Hello World

8 Example //to write a function function proc1 (d){ // procedure method
d = a; // local variable d alert ('d * c = ' + d * c) // alert ('a * c') on screen // no return; } proc1(); function proc2(d){ // function method d = 70; return d; // return value alert ('proc2 value = ' + proc2()); //alert return value of proc1()

9 Example // input output var tex = prompt("plz input some text","");
document.write(tex); </script>


Download ppt "Javascript Short Introduction By Thanawat Varintree, 49540438."

Similar presentations


Ads by Google