Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 388 Internet Programming

Similar presentations


Presentation on theme: "CIS 388 Internet Programming"— Presentation transcript:

1 CIS 388 Internet Programming
Javascript Part 1

2 What is Javascript? JavaScript (/ˈdʒævəˌskrɪpt/[5]) is a high-level, dynamic, untyped, and interpreted programming language.[6] It has been standardized in the ECMAScript language specification.[7] Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production; the majority of websites employ it, and all modern Web browsers support it without the need for plug-ins.[6] JavaScript is prototype-based with first-class functions, making it a multi-paradigm language, supporting object-oriented,[8] imperative, and functional programming styles.[6] It has an API for working with text, arrays, dates and regular expressions, but does not include any I/O, such as networking, storage, or graphics facilities, relying for these upon the host environment in which it is embedded.[7] ( Javascript is a client-side scripting (programming) janguage Java and Javascript are NOT the same thing

3 Java vs Javascript Java is an Object Oriented Programming (OOP) language created by James Gosling of Sun Microsystems. JavaScript is a scripting language that was created by the fine people at Netscape and was originally known as LiveScript. JavaScript is a (very) distant cousin of Java in that it is also an OOP language. Many of their programming structures are similar. However, JavaScript contains a much smaller and simpler set of commands than does Java. It is easier for the average weekend warrior to understand.  (

4 Programing 101 Syntax – The syntax of a language is the structure and rules/commands of the language. The Syntax of javascript is similar to the java language Javascript has the same support for variables, programming methods/instructions and operators that most full-languages have.

5 Javascript Basics Javascript is NOT a markup language
Javascript is a scripting language Does not need to be compiled Runs in a browser Variables in javascript are “Loosely typed” Javascript can be included in an HTML page with the <script> tag or in an external “.js” file. Javascript operates on the “Client-side” and not the server side.

6 What is Javascript for? Javascript allows for a dynamic webpage and user interaction. It is one of the 3 fundamental/foundational languages of the internet (HTML, CSS, Javascript) Javascript allows your page to update dynamically and update information on the page based on user input (ex. Mortgage calculator -

7 Hello World! Javascript “Hello World” Alert Box <!DOCTYPE html>
<body> <script> alert('Hello, World!') </script> </body> </html>

8 Sample Javascript <!DOCTYPE html> <html> <body> <h1>Hello World!</h1> <button type="button" onclick="myFunction()">Set background image</button> <script> function myFunction() { document.body.style.backgroundColor = "#f3f3f3"; document.body.style.backgroundImage = "url('img_tree.png')"; } </script> </body> </html>

9 Javascript tutorial

10 Additional Resources W3 Schools Javascript tutorial: Javascript tutorials: Javascript scripts and code resources:


Download ppt "CIS 388 Internet Programming"

Similar presentations


Ads by Google