JavaScript

joeneetsjournalistInternet και Εφαρμογές Web

16 Φεβ 2014 (πριν από 3 χρόνια και 4 μήνες)

278 εμφανίσεις

JavaScript

Hazırlayanlar: Şerafettin Taşcı




Zeldal Özdemir

Outline


What is JavaScript?


History


Similar Technologies


What can JavaScript do?


Advantages of JavaScript


Drawbacks of JavaScript


Syntax and Implementation


Future of JavaScript


What is JavaScript?


Scripting language for dynamic Web pages


Embedded in HTML files. Not a stand
-
alone
application


-

Sometimes in a different “.js” file


Event
-
driven


-
onClick, onLoad, onChange, onMouseOver, etc..


Not compiled in server, interpreted by browser


-
Internet Explorer, Netscape Navigator, etc..


-

Unlike Java


Client
-
side: Faster Operation


-

Does not have to connect server for execution


History



Developed by Netscape in 1995




Original name is “LiveScript”



Standardized by the name “EcmaScript”



JavaScript is not Java


-
Use popularity of Java


Similar Technologies


JScript: Microsoft name for “JavaScript”



VBScript: Only in Internet Explorer



CGI: Server
-
side interactive forms



Flash & Shockwave: complex animations


Advantages of JavaScript



Very fast response to user



Reduce the load of server


Compatible with popular browsers


Easy to learn (similar structure and
syntax to C and Java)


-
abundant sources on Web for JavaScript

Drawbacks of JavaScript


Can be used for malicious purposes


-
unwanted ads, spyware, virus




Generally disabled in browsers



Different behaviour on different browsers


-

Check behaviour before using



What can JavaScript do?



Respond to user events



Validate forms before submission to server



Generate dynamic text in HTML file



Open a pop
-
up window with property control



Manage HTTP cookies



Dynamic content and positioning of pages


Location in HTML


JavaScript is located in HTML between <script> tags



Possible to put in <head>



or <body> element


-

<head> :





-

<body> :





Kept in an external JavaScript


file and called in HTML code



A Simple Example

Example Pop up Boxes

How about the future?


Advantage of existing popularity


Wide browser support


Adequate feature support for
programmers



Easy to disable in browsers


Security problems must be solved

This is the end of our
presentation...



Thanks for listening!