Download pptx - Introduction to Java Script

Transcript
Page 1: Introduction to Java Script

JAVA SCRIPT LANGUAGE

For web development

Vijay Kumar Verm

a (VJY)

I

24-March

-2014

Page 2: Introduction to Java Script

WHAT

PRO AND CONS

HOW TO USE

IMPLEMENT

EXAMPLE

OBJECTIVES

Page 3: Introduction to Java Script

What is Ja

va Script Dynamic Programming Language.

Its syntax was influenced by C. Developed by Brendan Eich Client-side scripts to interact with the

user Control the browser, Alter the document content that is

displayed Also used in used in server-side

programming, game development and the creation of desktop and mobile applications

Page 4: Introduction to Java Script

Take Some Examples

Page 5: Introduction to Java Script
Page 6: Introduction to Java Script
Page 7: Introduction to Java Script
Page 8: Introduction to Java Script

Pro and Cons of JS Javascript is executed on the

client side Javascript is a relatively easy

language Javascript is relatively fast to the

end user Extended functionality to web

pages JavaScript reduced the Server

Load.

Page 9: Introduction to Java Script

Security Issues Javascript rendering varies

Page 10: Introduction to Java Script

How to Use in

HTML Knowledge of HTML Text Editor Web Browser Some Idea and mind

Page 11: Introduction to Java Script

JavaScripts in HTML must be inserted between <script> and </script> tags.

JavaScripts can be put in the <body> and in the <head> section of an HTML page.

Page 12: Introduction to Java Script

Internal Java Script

External Java Script

Inline Java Script

Page 13: Introduction to Java Script

<html><head>

<script> //Type JS Script Here

</script></head><body>…</body><html>

Page 14: Introduction to Java Script

<script lang="text/javascript" src=“URL of .JS File">

</script>

Page 15: Introduction to Java Script

<a href="#" onclick="alert('Hi')">

Click Me</a>

Page 16: Introduction to Java Script

var i=0;

function test() { for (i=0; i<10; i++) { document.write("Hello World!"); }}

test();

Page 17: Introduction to Java Script

Write Firs

t Program<html>

<head><title>Hello World in JS</title><script language="javaScript">

document.write("Hello World");</script>

</head>

<body></body></html>

Page 18: Introduction to Java Script

<html><head>

<title>InLine JS</title></head>

<body><input type="text" value="Your

Name" onFocus="this.value=''"/></body></html>

Page 19: Introduction to Java Script

Have Any Question?

facebook.com/groups/sviet.mca

[email protected]

Page 20: Introduction to Java Script

Thank You