Tema 5 JavaScript JavaScriptand and

Size: px
Start display at page:

Download "Tema 5 JavaScript JavaScriptand and"

Transcription

1 escuela técnica superior de ingeniería informática Versión original: Amador Durán, David Benavides y Pablo Fernandez (noviembre 2006 Manuel Resinas (noviembre 2007); Reestructuración de contenido. Última revisión: Pablo Fernandez (noviembre 2010); Traduccion ejemplos y cambios menores. Tiempo: 4h Tema 5 and and DOM Departamento de Lenguajes Software Engineering Group

2 4.7 Modifying Main features of It is interpreted (script language), not compiled It is an object-oriented language It is not Java, although its syntax is similar 1

3 4.7 Modifying Comments in // One line commet /* Several lines comments */ are the same as in Java There may be comments of one line or several lines. They have the same syntax as in Java or C++. 2

4 4.7 Modifying Basic data types in Strings: " Hello, world!", Numbers: 12, 22.4, -5 Booleans: true, false String constants is 'cool'." You must be careful with quotes' 'Can I use <h1>html</h1> tags?' "Can I use the slash: \\?" 3

5 4.7 Modifying Declaration of variables in is case sensitive, which means variable name is not the same as variable Name. It is not mandatory to declare variables, but it is recommended. var ABDscore; ABDscore = 10; Initialization of variables var ABDscore; ABDscore = 10; // No explicit declaration ABDscore = 10; NOT RECOMMENDED var Pract = 10, Test = 10; var Total = (Pract*0.4) + (Test*0.6); 4

6 4.7 Modifying Functions in function function_name( parameters ) { } var local_variable = initial_value; // function code return (returned value); If there is no return the function returns an undefined variable. There are three predefined functions that are very useful to validate forms: parseint: converts a string to an integer. parsefloat: converts a string to a float. isnan: it is true whether the parameter is not a number. parseint( "456" ) == 456; // true parsefloat( "1.34" ) == 1.34; // true isnan( parseint( one" ) ); // true 5

7 4.7 Modifying Control structures in They have the same syntax as in Java and C++. if (condition) { } // if block else { } // else block while (condition) { } // while block do { //do block } while (condition) switch (expresión) { case etiq1 : // block 1 } break; case etiq2 : // block 2 break;... default : // bloquen for (i=0; i<=n; i++) { } // for block 6

8 4.7 Modifying Conditionals if (condition) { /* Code executed if condition is true*/ } else { /* Code executed if condition is false */ } Condition examples var ABDpassed; var notinitialized; var ABDscore = 10; ABDpassed = true; while (condition) { /* Code executed if condition while true */ } do { /* Code executed if condition is true */ } while (condition) (ABDpassed) es true (notinitialized) es false (ABDscore >= 5) es true (ABDscore == 5) es false 7

9 4.7 Modifying classes Classes define categories of objects. For instance: Car, Person, String, Objects in An object represents one instance of a class. For instance, joe and mike are instances of class Person. var joe = new Person(); var mike = new Person(); Objects are associative arrays, to which new properties or functions (methods) can be dynamically added. Properties can be accessed as follows: object.property object[ property"] Methods can be accessed as follows: object.method( parameters ) 8

10 4.7 Modifying has several predefined classes The most commonly used are: Array, Boolean, Math, Date, Number, Object y String. They can be used to create new instances: var str1, str2; str1 = new String( My String"); str2 = str1.touppercase(); // str2 = MY STRING" Or statically: var str; str = String( Static").toUpperCase(); // str = "STATIC" 9

11 4.7 Modifying Predefined classes: String Properties length: string length. Methods big(): sets the font bigger bold(): sets the font bolder charat(n): returns the character at position n match(c) : returns whether substring c belongs to the string substring(x,y): returns the substring from x to y both included (strings start in 0) tolowercase(): converts to lower case touppercase(): converts to upper case valueof() : returns the value of type string (important when comparing strings) tostring(): converts the object to a string 10

12 4.7 Modifying Predefined classes: Math Methods abs(número): returns the absolute value max(x,y): returns the maximum between x and y min(x,y): returns the minimum between x and y pow(base, exp): pow random(): returns a random number in [0,1] round(número): rounds to the closest integer sin(número): function sin sqrt(número): square root tan(número): tangent... 11

13 4.7 Modifying Predefined classes: Array Properties length: length of the array Methods join(): joins the elements separating them with commas. reverse(): inverts the order of the elements sort(): sort the elements of the array a = new Array (25); // creates an array of 25 elements a = new Array (1,"abd",true); // an array with 3 elements a = new Array ( mystring"); // an array with one string a = new Array (false); // an array with element false Array with 3 rows and 6 columns? a = new Array (3); for (i=0;i<3;i++) a[i]= new Array (6); //array access a[i][j] 12

14 4.7 Modifying Predefined classes: Date Methods getdate(): returns the day of the current month as an integer between 1 and 31 getday(): returns the day of the current week as an integer between 0 and 6 gethours(): returns the hour of the current time as in integer between 0 and 23. getminutes(): returns the minutes of the current time as an integer between 0 and 59. getmonth(): returns the month of the current year as an integer between 0 and 11. getseconds(): returns the seconds of the current minute as an integer between 0 and 59. gettime(): returns the time in miliseconds transcurred from the 1st January

15 4.7 Modifying Predefined classes: Date Methods getyear(): returns the current year as an integer setdate(day, month): sets the day and month togmtstring(): returns a string with the current date var f = new Date (); var f = new Date (year, month); var f = new Date (year, month, day); var f = new Date (year, month, day, hour); var f = new Date (year, month, day, hour, minutes); var f = new Date (year, month, day, hour, minutes, seconds); 14

16 4.7 Modifying Predefined classes: Date function dayoftheweekinspanish() { } var today = new Date(); var day; switch ( day.getday() ) { } case 0: day = "Domingo"; case 1: day = "Lunes"; case 2: day = "Martes"; case 3: day = "Miércoles"; case 4: day = "Jueves"; case 5: day = "Viernes"; case 6: day = "Sábado"; return( day ); break; break; break; break; break; break; break; 15

17 4.7 Modifying is a programming language like any other and it can be used in many different contexts. However, it has a widespread use in the web where it is used to give dynamism to web pages. When used inside a web browser, the web browser provides several predefined objects Some objects are related to the web browser (BOM Browser Object Model) window.alert( que viene ABD!"); Others are related to the structure of the HTML document (DOM) and can be accessed by means of object document: <img id="imgmail" src="mail.jpg"/> document.getelementbyid("imgmail").src = "mail2.jpg"; 16

18 4.7 Modifying in context <html> Internet <head> </head> <body> <h1>página</h1> </body> page.html Server.com </html> page.html 17

19 4.7 Modifying in context Página <html> Internet <head> </head> <body> <h1>página</h1> </body> server.com </html> page.html 18

20 4.7 Modifying in context <html> Internet <head> </head> <body> <h1>página</h1> <script> document.write(" (" Hola Mundo!"); </script> </body> </html> page.html page.html server.com 19

21 4.7 Modifying in context Página <html> Internet <head> </head> <body> <h1>página</h1> <script> document.write(" Hola Mundo!"); </script> </body> </html> page.html server.com 20

22 4.7 Modifying in context Página Hola Mundo! <html> Internet <head> </head> <body> <h1>página</h1> <script> page.html server.com document.write(" Hola Mundo!"); </script> </body> </html> 21

23 4.7 Modifying Where do we use? In the HTML document Inside element head Inside element body As an event handler onevento= code" * As the URL of a link href="javascript:code" ** In a separated file code inside element script should be placed inside HTML comments to avoid problems with old web browsers. In XHTML it must be encolsed a section CDATA. In which order is code executed? code is always executed in the same order as in the HTML code. Usually, element head contains only declarations of variables and functions. *Events and their handling are studied in the next lesson. **NOT RECOMMENDED. 22

24 4.7 Modifying Script inside the HTML document (body) <html> <head> <title>document title</ </title> <!-- other header information --> </head> <body> <!-- document content --> <!- more document content --> </body body> </html html> <script type=" ="text/javascript"> <!-- // code //-- --> </script> 23

25 4.7 Modifying Script inside the HTML document(head head) <html> <head> <title>document title</ </title> <script type=" ="text/javascript"> <![CDATA[ ]]> // code <!-- other header information --> </head> <body> <!-- document content --> </body body> </html html> </script> 24

26 4.7 Modifying Script in a different file <html> <head> <title>document title</ </title> <script type=" ="text/javascript" src="mycode.js" ="mycode.js"> </script> <!-- header information --> </head> <body> <!-- document content --> </body body> </html html> // // code mycode.js 25

27 4.7 Modifying Browser Object Model (BOM) window: the window of the navigator. screen: the screen. navigator: the web browser itself. history: the history of navigation. location: the URL of the current page. location window navigator 26

28 4.7 Modifying Predefined objects: window Represents the window of the navigator Properties status: status bar message document: current HTML document history: navigation history closed: true if the window is closed length: number of frames that are contained in the window frames: an array that contains all frames that are contained in the window, i.e., returns an array of objects of type Frame 27

29 4.7 Modifying Predefined objects: window Methods alert(msg): shows a window with a message confirm(msg): shows a window with an accept and a cancel button; it returns true if the user presses accept and false if he/she presses cancel prompt(msg,default): shows a window that prompts a string with a default value open(url,nombre,opt): opens a new window in the web browser close(): closes the window 28

30 4.7 Modifying Predefined object: navigator Represents the navigator intself. Properties appname: name of the navigator: Microsoft Internet Explorer, Mozilla, NetScape, appversion: Netscape 5.0 (Windows; es-es) Microsoft Internet Explorer 4.0 (compatible; MSIE 6.0; Windows NT 5.0) mimetypes: an array with the MIME types (Multipurpose Internet Mail Extensions) supported by the navigator (Application, Audio, Image, Message, Multipart, Text, Video) plugins: an array with the plugins that are installed in the navigator javaenabled(): returns whether the navigator supports Java applets 29

31 4.7 Modifying Predefined objects: frame Represents a frame. Propiedades parent: the parent frame Predefined objects: location Represents the URL of the document displayed in window Properties host: Contains the server name and the port number of the URL hostname: server name pathname: path without including the server name and the port number port: port number protocol: protocol (http, ftp,..) href: URL that can be dynamically changed 30

32 4.7 Modifying What is DOM? Designed to dynamically access and update the content and structure of XML and HTML documents W3C standard ( ) Also known as W3CDOM Three levels: level 1, level 2, level 3 Each navigator implements a version of DOM Starting from IE 6 (Trident Trident) and browsers based on Gecko (Mozilla, Firefox) support W3CDOM Trident Gecko KHTML Presto icab L Yes 7.0 Yes L2 Minor Major Major Major Major L3 No Minor Minor Minor Minor 31

33 4.7 Modifying The DOM tree document Menu Primeros Pasta Ensalada Segundos Lomo Flamenquin head body (html) title h1 Primeros ul Menu Cafeta Menu li li Pasta Ensalada document head body h1 ul title li li <html> <head> <title>menu Cafeta</title> </head> <body> <h1>menu </h1> Primeros <ul> <li>pasta</li> <li>ensalada</li> </ul> Segundos <ul> <li>lomo</li> <li>flamenquin</li> </ul> </body> </html> 32

34 4.7 Modifying DOM nodes document head body (html) title h1 Primeros ul Menu Cafeta Menu li li Pasta Ensalada Elementos body h1 Texto Menu Primeros 33

35 4.7 Modifying Node types <div id= MyDiv >DOM is easy</div> Elements attribute element Represent an HTML tag Attributes Provide access to the attributes of a tag. Text Represent strings. text div id MyDiv DOM is easy 34

36 4.7 Modifying Elements Properties tagname (READ ONLY) Methods Contains the name of the element s tag getattribute(n) IMG Returns the attribute with name n setattribute(n,v) Sets the value of attribute n to v <img src= homer.jpg /> <script type=" ="text/javascript"> <! // // image contains the object of the element alert(image.tagname); image.setattribute( ( src, bart.jpg src, bart.jpg ); ); //-- --> </script> 35

37 4.7 Modifying Traversing Array childnodes gives access to the child nodes of an element. Object document.body provides direct access to the document body document body h1 ul Menu li li Pasta element subelem1 subelem2 subelem3 <script type="text/javascript"> <!-- element.childnodes[0]; element.childnodes[1]; element.childnodes[2]; var e1 = document.body.childnodes[0]; var root = document.body; var e2 = root.childnodes[1].childnodes[0]; var lista = root.childnodes[1]; lista.childnodes[1].childnodes[0]; //-- --> </script> Ensalada 36

38 4.7 Modifying Finding elements in There are two ways: By means of the tag name getelementsbytagname(tagname) <script type=" ="text/javascript"> <!-- var images = document.getelementsbytagname( ( img ); var firstimage = images[0]; //-- --> </script> By means of the id of the element getelementbyid(id) <script type=" ="text/javascript"> <!-- var div = document.getelementbyid( ( divprincipal ); //-- --> </script> 37

39 4.7 Modifying Finding elements in (examples) <html> <head> <title>menu Cafeta</title> </head> <body> <h1>menu </h1> <div id= primeros > Primeros <ul> <li>pasta</li> <li>ensalada</li> </ul> </div> <!-- --> </body> </html> <script type="text/javascript"> <!-- var items = document.getelementsbytagname( li ); var miitem = items[1]; var midiv = document.getelementbyid( primeros ); var lista = midiv.getelementsbytagname( ul )[0]; var items2 = lista.getelementsbytagname( li ); //-- --> </script> 38

40 4.7 Modifying Modifying the DOM tree All nodes have an interface to modify the structure of (i.e. add nodes, remove nodes ) To create new elements, you must use the parent node (document). <script type=" ="text/javascript"> <!-- var newtextnode; newtextnode = document.createtextnode( ( Hello world"); document.body.appendchild(newtextnode newtextnode); //-- --> </script> insertbefore replacechild removechild appendchild createelement createtextnode 39

41 4.7 Modifying <html> <head> Event handling (L2) <title>document title</ </title> </head> <body> <!-- document content --> <tag onevent= code"> <! more document content --> </body body> </html html> </tag tag> It is usually a call to a function that has been previously declared in either section head or an external file. 40

42 4.7 Modifying HTML DOM It is an extension to the basic DOM to make the management of HTML documents easier Document Plugin[] Applet[] Anchor[] Area[] Image[] Link[] Layer[] FileUpload Password Radio Checkbox Hidden Submit Form[] Textarea Text Reset Button Select Options[] 41

43 4.7 Modifying Predefined objects: document Represents the document that is being displayed. Properties bgcolor: integer value with the code of the background color or string with the color ("#12345", "red") fgcolor: identifies the text color forms: an array that contains all elements form of one document images: array that contains all images in the document lastmodified: string with the las modification date links: array that contains all links in the document referrer: URL of the link from which the user reached the document. title: document title 42

44 4.7 Modifying Predefined objects: document Methods close(): closes the document write(srt), writeln(str): modifies the document (notice that writeln does not insert a new line when the document is displayed in the navigator) getelementbyid(id): returns the element with the specified ID <img id="imgmail" src="mail.jpg"/> document.getelementbyid("imgmail").src = "mail2.jpg"; 43

45 4.7 Modifying Predefined objects: link Represents the links. Properties target: string with the target name href: string with the URL of the link 44

46 4.7 Modifying Predefined objects: image Represents the images. Properties border: integer with the value of the border of the image complete: boolean that indicates whether the image has been fully loaded from the server src: it refers to the content of the image itself 45

47 4.7 Modifying Predefined objects: form Represents the forms Properties Those related to the attributes: action, method, etc. elements: array that contains all the elements in the form (buttons, text areas,...) length: number of elements of a form Methods submit(): submits the form (it is the same as clicking the submit button of the form) reset(): resets the content of the form 46

48 4.7 Modifying Predefined objects: text / textarea Represents the text s Properties All properties related to this kind of s such as defaultvalue, value: contains the string entered in the text are or text box; therefore, the content of a text area or text box can be modified within Methods focus(): captures the focus on the text area select(): selects the text in the text area 47

49 4.7 Modifying Predefined objects: checkbox Represents a check box Properties name: object name checked: indicates whether the object has been checked defaultchecked: indicates whether the object should be checked by default value: indicates the value associated to the check box (atributte value of HTML) Methods click(): the same as if the user clicks the 48

50 4.7 Modifying Predefined objects: radio This object is an array of all the elemnts that compose the radio button. Properties length : indicates the number of the elements that compose the radio button. Item : the array that contains the elements that compose the radio button. Each element in the array has the following properties: name: object name. checked: indicates whether the object has been selected. defaultchecked: indicates whether the object should be checked by default. value: indicates the value associated to the radio button (atributte value). 49

51 4.7 Modifying Predefined objects: select Represents element select. Properties length: number of elements that it contains options: array with the selection options, each one with the following properties: defaultchecked: indicates whether the object should be selected by default index: the position of the object in the array selected: indicates whether the object is selected selectedindex: integer that indicates the index of the position that has been selected. text: string that shows the text shown in the option selectedindex: integer that indicates the index of the position that has been selected 50

52 4.7 Modifying Web references References in the HTML standard: Information about : ECMAScript standard (Javascript 1.5) htm Tutorials:

Tema 5 JavaScript JavaScriptand and

Tema 5 JavaScript JavaScriptand and Versión original: Amador Durán, David Benavides y Pablo Fernandez (noviembre 2006) Última revisión: Manuel Resinas (noviembre 2007); Reestructuración de contenido. Tiempo: 4h [Ángel US V7] Diseño: Amador

More information

What Is JavaScript? A scripting language based on an object-orientated programming philosophy.

What Is JavaScript? A scripting language based on an object-orientated programming philosophy. What Is JavaScript? A scripting language based on an object-orientated programming philosophy. Each object has certain attributes. Some are like adjectives: properties. For example, an object might have

More information

Javascript Hierarchy Objects Object Properties Methods Event Handlers. onload onunload onblur onfocus

Javascript Hierarchy Objects Object Properties Methods Event Handlers. onload onunload onblur onfocus Javascript Hierarchy Objects Object Properties Methods Event Handlers Window Frame Location History defaultstatus frames opener parent scroll self status top window defaultstatus frames opener parent scroll

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Ch. 5: JavaScript An Object-Based Language Ch. 6: Programming the Browser Review Data Types & Variables Data Types Numeric String Boolean Variables Declaring

More information

Chapter 1 Introduction to Computers and the Internet

Chapter 1 Introduction to Computers and the Internet CPET 499/ITC 250 Web Systems Dec. 6, 2012 Review of Courses Chapter 1 Introduction to Computers and the Internet The Internet in Industry & Research o E Commerce & Business o Mobile Computing and SmartPhone

More information

PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore WEB PROGRAMMING Solution Set II

PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore WEB PROGRAMMING Solution Set II PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore 560 100 WEB PROGRAMMING Solution Set II Section A 1. This function evaluates a string as javascript statement or expression

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Write JavaScript to generate HTML Create simple scripts which include input and output statements, arithmetic, relational and

More information

INFS 2150 Introduction to Web Development and e-commerce Technology. Programming with JavaScript

INFS 2150 Introduction to Web Development and e-commerce Technology. Programming with JavaScript INFS 2150 Introduction to Web Development and e-commerce Technology Programming with JavaScript 1 Objectives JavaScript client-side programming Example of a JavaScript program The element

More information

Objectives. Introduction to JavaScript. Introduction to JavaScript INFS Peter Y. Wu, RMU 1

Objectives. Introduction to JavaScript. Introduction to JavaScript INFS Peter Y. Wu, RMU 1 Objectives INFS 2150 Introduction to Web Development and e-commerce Technology Programming with JavaScript JavaScript client-side programming Example of a JavaScript program The element

More information

JavaScript: The Basics

JavaScript: The Basics JavaScript: The Basics CISC 282 October 4, 2017 JavaScript A programming language "Lightweight" and versatile Not universally respected Appreciated in the web domain Adds programmatic functionality to

More information

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

5. JavaScript Basics

5. JavaScript Basics CHAPTER 5: JavaScript Basics 88 5. JavaScript Basics 5.1 An Introduction to JavaScript A Programming language for creating active user interface on Web pages JavaScript script is added in an HTML page,

More information

JavaScript!= Java. Intro to JavaScript. What is JavaScript? Intro to JavaScript 4/17/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

JavaScript!= Java. Intro to JavaScript. What is JavaScript? Intro to JavaScript 4/17/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML INTRODUCTION TO WEB DEVELOPMENT AND HTML Intro to JavaScript Lecture 13: Intro to JavaScript - Spring 2013 What is JavaScript? JavaScript!= Java Intro to JavaScript JavaScript is a lightweight programming

More information

CITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging

CITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging CITS1231 Web Technologies JavaScript Math, String, Array, Number, Debugging Last Lecture Introduction to JavaScript Variables Operators Conditional Statements Program Loops Popup Boxes Functions 3 This

More information

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 13: Intro to JavaScript - Spring 2011

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 13: Intro to JavaScript - Spring 2011 INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 13: Intro to JavaScript - Spring 2011 Outline Intro to JavaScript What is JavaScript? JavaScript!= Java Intro to JavaScript JavaScript is a lightweight

More information

DOM. Ajax Technology in Web Programming. Sergio Luján Mora. DLSI - Universidad de Alicante 1. API for accessing and manipulating HTML documents

DOM. Ajax Technology in Web Programming. Sergio Luján Mora. DLSI - Universidad de Alicante 1. API for accessing and manipulating HTML documents Departamento de Lenguajes y Sistemas Informáticos Ajax Technology in Web Programming Sergio Luján Mora API for accessing and manipulating HTML documents DOM DLSI - Universidad de Alicante 1 Introduction

More information

Chapter 4 Basics of JavaScript

Chapter 4 Basics of JavaScript Chapter 4 Basics of JavaScript JavaScript/EcmaScript References The official EcmaScript, third edition, specification http://www.ecma-international.org/publications/files/ecma-st/ecma-262.pdf A working

More information

Javascript. Many examples from Kyle Simpson: Scope and Closures

Javascript. Many examples from Kyle Simpson: Scope and Closures Javascript Many examples from Kyle Simpson: Scope and Closures What is JavaScript? Not related to Java (except that syntax is C/Java- like) Created by Brendan Eich at Netscape later standardized through

More information

a Why JavaScript? jonkv interactivity on the web CGI JavaScript Java Applets Netscape LiveScript JavaScript 1: Example

a Why JavaScript? jonkv interactivity on the web CGI JavaScript Java Applets Netscape LiveScript JavaScript 1: Example Why JavaScript? 2 JavaScript JavaScript the language Web page manipulation with JavaScript and the DOM 1994 1995: Wanted interactivity on the web Server side interactivity: CGI Common Gateway Interface

More information

Exercise 1: Basic HTML and JavaScript

Exercise 1: Basic HTML and JavaScript Exercise 1: Basic HTML and JavaScript Question 1: Table Create HTML markup that produces the table as shown in Figure 1. Figure 1 Question 2: Spacing Spacing can be added using CellSpacing and CellPadding

More information

Basics of JavaScript. Last Week. Needs for Programming Capability. Browser as Development Platform. Using Client-side JavaScript. Origin of JavaScript

Basics of JavaScript. Last Week. Needs for Programming Capability. Browser as Development Platform. Using Client-side JavaScript. Origin of JavaScript Basics of JavaScript History of the Web XHTML CSS Last Week Nan Niu (nn@cs.toronto.edu) CSC309 -- Fall 2008 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static

More information

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 15: JavaScript loops, Objects, Events - Spring 2011

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 15: JavaScript loops, Objects, Events - Spring 2011 INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 15: JavaScript loops, Objects, Events - Spring 2011 Outline Selection Statements (if, if-else, switch) Loops (for, while, do..while) Built-in Objects: Strings

More information

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes Course Title Course Code WEB DESIGNING TECHNOLOGIES DCE311 Lecture : 3 Course Credit Practical : Tutorial : 0 Total : 5 Course Learning Outcomes At end of the course, students will be able to: Understand

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

CECS 189D EXAMINATION #1

CECS 189D EXAMINATION #1 CECS 189D EXAMINATION #1 SPRING 10 70 points MULTIPLE CHOICE 2 points for each correct answer Identify the choice that best answers the question on a Scantron 882 with a pencil #2. When you're on the campus

More information

Introduction to PHP (PHP: Hypertext Preprocessor)

Introduction to PHP (PHP: Hypertext Preprocessor) Versión original: Amador Durán Toro y David Benavides (diciembre 2006) Última revisión: José An tonio Parejo, adaptación a PHP y traducción. Tiempo: 2h escuela técnica superior de ingeniería informática

More information

UNIT-4 JAVASCRIPT. Prequisite HTML/XHTML. Origins

UNIT-4 JAVASCRIPT. Prequisite HTML/XHTML. Origins UNIT-4 JAVASCRIPT Overview of JavaScript JavaScript is a sequence of statements to be executed by the browser. It is most popular scripting language on the internet, and works in all major browsers, such

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson reserved. 0-13-185603-0 HTML HELLO WORLD! Document

More information

Such JavaScript Very Wow

Such JavaScript Very Wow Such JavaScript Very Wow Lecture 9 CGS 3066 Fall 2016 October 20, 2016 JavaScript Numbers JavaScript numbers can be written with, or without decimals. Extra large or extra small numbers can be written

More information

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript Lecture 3: The Basics of JavaScript Wendy Liu CSC309F Fall 2007 Background Origin and facts 1 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static content How

More information

Client-Side Web Technologies. JavaScript Part I

Client-Side Web Technologies. JavaScript Part I Client-Side Web Technologies JavaScript Part I JavaScript First appeared in 1996 in Netscape Navigator Main purpose was to handle input validation that was currently being done server-side Now a powerful

More information

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application. Extra notes - Client-side Design and Development Dr Nick Hayward HTML - Basics A brief introduction to some of the basics of HTML. Contents Intro element add some metadata define a base address

More information

1. Cascading Style Sheet and JavaScript

1. Cascading Style Sheet and JavaScript 1. Cascading Style Sheet and JavaScript Cascading Style Sheet or CSS allows you to specify styles for visual element of the website. Styles specify the appearance of particular page element on the screen.

More information

ADDING FUNCTIONS TO WEBSITE

ADDING FUNCTIONS TO WEBSITE ADDING FUNCTIONS TO WEBSITE JavaScript Basics Dynamic HTML (DHTML) uses HTML, CSS and scripts (commonly Javascript) to provide interactive features on your web pages. The following sections will discuss

More information

1.264 Lecture 12. HTML Introduction to FrontPage

1.264 Lecture 12. HTML Introduction to FrontPage 1.264 Lecture 12 HTML Introduction to FrontPage HTML Subset of Structured Generalized Markup Language (SGML), a document description language SGML is ISO standard Current version of HTML is version 4.01

More information

write vs. writeln Prompting as Page Loads Today s Goals CSCI 2910 Client/Server-Side Programming Intermediate File vs. HTML Output

write vs. writeln Prompting as Page Loads Today s Goals CSCI 2910 Client/Server-Side Programming Intermediate File vs. HTML Output CSCI 2910 Client/Server-Side Programming Topic: JavaScript Part 2 Today s Goals Today s lecture will cover: More objects, properties, and methods of the DOM The Math object Introduction to form validation

More information

Netscape Introduction to the JavaScript Language

Netscape Introduction to the JavaScript Language Netscape Introduction to the JavaScript Language Netscape: Introduction to the JavaScript Language Eckart Walther Netscape Communications Serving Up: JavaScript Overview Server-side JavaScript LiveConnect:

More information

5. Strict mode use strict ; 6. Statement without semicolon, with semicolon 7. Keywords 8. Variables var keyword and global scope variable 9.

5. Strict mode use strict ; 6. Statement without semicolon, with semicolon 7. Keywords 8. Variables var keyword and global scope variable 9. Javascript 1) Javascript Implementation 1. The Core(ECMAScript) 2. DOM 3. BOM 2) ECMAScript describes 1. Syntax 2. Types 3. Statements 4. Keywords 5. Reserved words 6. Operators 7. Objects 3) DOM 1. Tree

More information

JavaScript code is inserted between tags, just like normal HTML tags:

JavaScript code is inserted between tags, just like normal HTML tags: Introduction to JavaScript In this lesson we will provide a brief introduction to JavaScript. We won t go into a ton of detail. There are a number of good JavaScript tutorials on the web. What is JavaScript?

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

HTML HTML/XHTML HTML / XHTML HTML HTML: XHTML: (extensible HTML) Loose syntax Few syntactic rules: not enforced by HTML processors.

HTML HTML/XHTML HTML / XHTML HTML HTML: XHTML: (extensible HTML) Loose syntax Few syntactic rules: not enforced by HTML processors. HTML HTML/XHTML HyperText Mark-up Language Basic language for WWW documents Format a web page s look, position graphics and multimedia elements Describe document structure and formatting Platform independent:

More information

E ECMAScript, 21 elements collection, HTML, 30 31, 31. Index 161

E ECMAScript, 21 elements collection, HTML, 30 31, 31. Index 161 A element, 108 accessing objects within HTML, using JavaScript, 27 28, 28 activatediv()/deactivatediv(), 114 115, 115 ActiveXObject, AJAX and, 132, 140 adding information to page dynamically, 30, 30,

More information

CSI 3140 WWW Structures, Techniques and Standards. Browsers and the DOM

CSI 3140 WWW Structures, Techniques and Standards. Browsers and the DOM CSI 3140 WWW Structures, Techniques and Standards Browsers and the DOM Overview The Document Object Model (DOM) is an API that allows programs to interact with HTML (or XML) documents In typical browsers,

More information

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8 INDEX Symbols = (assignment operator), 56 \ (backslash), 33 \b (backspace), 33 \" (double quotation mark), 32 \e (escape), 33 \f (form feed), 33

More information

Session 16. JavaScript Part 1. Reading

Session 16. JavaScript Part 1. Reading Session 16 JavaScript Part 1 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript / p W3C www.w3.org/tr/rec-html40/interact/scripts.html Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/

More information

Like most objects, String objects need to be created before they can be used. To create a String object, we can write

Like most objects, String objects need to be created before they can be used. To create a String object, we can write JavaScript Native Objects Broswer Objects JavaScript Native Objects So far we have just been looking at what objects are, how to create them, and how to use them. Now, let's take a look at some of the

More information

Cascade Stylesheets (CSS)

Cascade Stylesheets (CSS) Previous versions: David Benavides and Amador Durán Toro (noviembre 2006) Last revision: Manuel Resinas (october 2007) Tiempo: 2h escuela técnica superior de ingeniería informática Departamento de Lenguajes

More information

JavaScript: Events, DOM and Attaching Handlers

JavaScript: Events, DOM and Attaching Handlers JavaScript: Events, DOM and Attaching Handlers CISC 282 October 11, 2017 Keyboard and Text Events Name The User Must Applicable Elements blur remove focus , ,... focus apply focus , ,...

More information

Documents and computation. Introduction to JavaScript. JavaScript vs. Java Applet. Myths. JavaScript. Standard

Documents and computation. Introduction to JavaScript. JavaScript vs. Java Applet. Myths. JavaScript. Standard Introduction to Prof. Ing. Andrea Omicini II Facoltà di Ingegneria, Cesena Alma Mater Studiorum, Università di Bologna andrea.omicini@unibo.it Documents and computation HTML Language for the description

More information

JavaScript by Vetri. Creating a Programmable Web Page

JavaScript by Vetri. Creating a Programmable Web Page XP JavaScript by Vetri Creating a Programmable Web Page 1 XP Tutorial Objectives o Understand basic JavaScript syntax o Create an embedded and external script o Work with variables and data o Work with

More information

Web Programming/Scripting: JavaScript

Web Programming/Scripting: JavaScript CS 312 Internet Concepts Web Programming/Scripting: JavaScript Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11/ 1 Outline!

More information

PIC 40A. Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers. Copyright 2011 Jukka Virtanen UCLA 1 04/24/17

PIC 40A. Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers. Copyright 2011 Jukka Virtanen UCLA 1 04/24/17 PIC 40A Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers 04/24/17 Copyright 2011 Jukka Virtanen UCLA 1 Objects in JS In C++ we have classes, in JS we have OBJECTS.

More information

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary

More information

JAVASCRIPT. Ajax Technology in Web Programming. Sergio Luján Mora. DLSI - Universidad de Alicante 1. Basic syntax and features

JAVASCRIPT. Ajax Technology in Web Programming. Sergio Luján Mora. DLSI - Universidad de Alicante 1. Basic syntax and features Departamento de Lenguajes y Sistemas Informáticos Ajax Technology in Web Programming Sergio Luján Mora Basic syntax and features JAVASCRIPT DLSI - Universidad de Alicante 1 Index Introduction Including

More information

escuela técnica superior de ingeniería informática

escuela técnica superior de ingeniería informática Tiempo: 2h escuela técnica superior de ingeniería informática Previous versions: David Benavides and Amador Durán Toro (noviembre 2006) Manuel Resinas (october 2007) Last revision:pablo Fernandez, Cambios

More information

Student, Perfect Final Exam May 25, 2006 ID: Exam No CS-081/Vickery Page 1 of 6

Student, Perfect Final Exam May 25, 2006 ID: Exam No CS-081/Vickery Page 1 of 6 Student, Perfect Final Exam May 25, 2006 ID: 9999. Exam No. 3193 CS-081/Vickery Page 1 of 6 NOTE: It is my policy to give a failing grade in the course to any student who either gives or receives aid on

More information

Indian Institute of Technology Kharagpur. Javascript Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

Indian Institute of Technology Kharagpur. Javascript Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T. Indian Institute of Technology Kharagpur Javascript Part III Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T. Kharagpur, INDIA Lecture 27: Javascript Part III On completion, the student

More information

New Perspectives on Creating Web Pages with HTML. Tutorial Objectives

New Perspectives on Creating Web Pages with HTML. Tutorial Objectives New Perspectives on Creating Web Pages with HTML Tutorial 9: Working with JavaScript Objects and Events 1 Tutorial Objectives Learn about form validation Study the object-based nature of the JavaScript

More information

Tutorial 10: Programming with JavaScript

Tutorial 10: Programming with JavaScript Tutorial 10: Programming with JavaScript College of Computing & Information Technology King Abdulaziz University CPCS-665 Internet Technology Objectives Learn the history of JavaScript Create a script

More information

Javascript Methods. concat Method (Array) concat Method (String) charat Method (String)

Javascript Methods. concat Method (Array) concat Method (String) charat Method (String) charat Method (String) The charat method returns a character value equal to the character at the specified index. The first character in a string is at index 0, the second is at index 1, and so forth.

More information

Programmazione Web a.a. 2017/2018 HTML5

Programmazione Web a.a. 2017/2018 HTML5 Programmazione Web a.a. 2017/2018 HTML5 PhD Ing.Antonino Raucea antonino.raucea@dieei.unict.it 1 Introduzione HTML HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text

More information

DOM. Contents. Sergio Luján Mora. What is DOM? DOM Levels DOM Level 0 DOM Level 1. Departamento de Lenguajes y Sistemas Informáticos

DOM. Contents. Sergio Luján Mora. What is DOM? DOM Levels DOM Level 0 DOM Level 1. Departamento de Lenguajes y Sistemas Informáticos DOM Sergio Luján Mora Departamento de Lenguajes y Sistemas Informáticos What is DOM? DOM Levels DOM Level 0 DOM Level 1 Contents 1 What is the DOM? The Document Object Model is an API for HTML and XML

More information

JavaScript Introduction

JavaScript Introduction JavaScript Introduction Web Technologies I. Zsolt Tóth University of Miskolc 2016 Zsolt Tóth (UM) JavaScript Introduction 2016 1 / 31 Introduction Table of Contents 1 Introduction 2 Syntax Variables Control

More information

JavaScript: Introduction, Types

JavaScript: Introduction, Types JavaScript: Introduction, Types Computer Science and Engineering College of Engineering The Ohio State University Lecture 19 History Developed by Netscape "LiveScript", then renamed "JavaScript" Nothing

More information

A Brief Introduction to HTML

A Brief Introduction to HTML A P P E N D I X HTML SuMMAry J A Brief Introduction to HTML A web page is written in a language called HTML (Hypertext Markup Language). Like Java code, HTML code is made up of text that follows certain

More information

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0 CSI 3140 WWW Structures, Techniques and Standards Markup Languages: XHTML 1.0 HTML Hello World! Document Type Declaration Document Instance Guy-Vincent Jourdan :: CSI 3140 :: based on Jeffrey C. Jackson

More information

PIC 40A. Midterm 1 Review

PIC 40A. Midterm 1 Review PIC 40A Midterm 1 Review XHTML and HTML5 Know the structure of an XHTML/HTML5 document (head, body) and what goes in each section. Understand meta tags and be able to give an example of a meta tags. Know

More information

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary

More information

Project 3 Web Security Part 1. Outline

Project 3 Web Security Part 1. Outline Project 3 Web Security Part 1 CS155 Indrajit Indy Khare Outline Quick Overview of the Technologies HTML (and a bit of CSS) Javascript PHP Assignment Assignment Overview Example Attack 1 New to web programming?

More information

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery. HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets

More information

CIW 1D CIW JavaScript Specialist.

CIW 1D CIW JavaScript Specialist. CIW 1D0-635 CIW JavaScript Specialist http://killexams.com/exam-detail/1d0-635 Answer: A QUESTION: 51 Jane has created a file with commonly used JavaScript functions and saved it as "allfunctions.js" in

More information

More on new. Today s Goals. CSCI 2910 Client/Server-Side Programming. Creating/Defining Objects. Creating/Defining Objects (continued)

More on new. Today s Goals. CSCI 2910 Client/Server-Side Programming. Creating/Defining Objects. Creating/Defining Objects (continued) CSCI 2910 Client/Server-Side Programming Topic: Advanced JavaScript Topics Today s Goals Today s lecture will cover: More on new and objects Built in objects Image, String, Date, Boolean, and Number The

More information

Interactor Tree. Edith Law & Mike Terry

Interactor Tree. Edith Law & Mike Terry Interactor Tree Edith Law & Mike Terry Today s YouTube Break https://www.youtube.com/watch?v=mqqo-iog4qw Routing Events to Widgets Say I click on the CS349 button, which produces a mouse event that is

More information

Document Object Model. Overview

Document Object Model. Overview Overview The (DOM) is a programming interface for HTML or XML documents. Models document as a tree of nodes. Nodes can contain text and other nodes. Nodes can have attributes which include style and behavior

More information

HTML CS 4640 Programming Languages for Web Applications

HTML CS 4640 Programming Languages for Web Applications HTML CS 4640 Programming Languages for Web Applications 1 Anatomy of (Basic) Website Your content + HTML + CSS = Your website structure presentation A website is a way to present your content to the world,

More information

Best Practices Chapter 5

Best Practices Chapter 5 Best Practices Chapter 5 Chapter 5 CHRIS HOY 12/11/2015 COMW-283 Chapter 5 The DOM and BOM The BOM stand for the Browser Object Model, it s also the client-side of the web hierarchy. It is made up of a

More information

CS1520 Recitation Week 2

CS1520 Recitation Week 2 CS1520 Recitation Week 2 Javascript http://cs.pitt.edu/~jlee/teaching/cs1520 Jeongmin Lee, (jlee@cs.pitt.edu) Today - Review of Syntax - Embed code - Syntax - Declare variable - Numeric, String, Datetime

More information

(Refer Slide Time: 01:40)

(Refer Slide Time: 01:40) Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #25 Javascript Part I Today will be talking about a language

More information

CSC Javascript

CSC Javascript CSC 4800 Javascript See book! Javascript Syntax How to embed javascript between from an external file In an event handler URL - bookmarklet

More information

Produced by. App Development & Modeling. BSc in Applied Computing. Eamonn de Leastar

Produced by. App Development & Modeling. BSc in Applied Computing. Eamonn de Leastar App Development & Modeling BSc in Applied Computing Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

ROSAEC Survey Workshop SELab. Soohyun Baik

ROSAEC Survey Workshop SELab. Soohyun Baik ROSAEC Survey Workshop SELab. Soohyun Baik Cross-Site Scripting Prevention with Dynamic Data Tainting and Static Analysis Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel,

More information

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week WEB DESIGNING HTML HTML - Introduction HTML - Elements HTML - Tags HTML - Text HTML - Formatting HTML - Pre HTML - Attributes HTML - Font HTML - Text Links HTML - Comments HTML - Lists HTML - Images HTML

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Data Types & Variables Decisions, Loops, and Functions Review gunkelweb.com/coms469 Review Basic Terminology Computer Languages Interpreted vs. Compiled Client

More information

Certified HTML5 Developer VS-1029

Certified HTML5 Developer VS-1029 VS-1029 Certified HTML5 Developer Certification Code VS-1029 HTML5 Developer Certification enables candidates to develop websites and web based applications which are having an increased demand in the

More information

JavaScript Functions, Objects and Array

JavaScript Functions, Objects and Array JavaScript Functions, Objects and Array Defining a Function A definition starts with the word function. A name follows that must start with a letter or underscore, followed by any number of letters, digits,

More information

UNIT -II. Language-History and Versions Introduction JavaScript in Perspective-

UNIT -II. Language-History and Versions Introduction JavaScript in Perspective- UNIT -II Style Sheets: CSS-Introduction to Cascading Style Sheets-Features- Core Syntax-Style Sheets and HTML Style Rle Cascading and Inheritance-Text Properties-Box Model Normal Flow Box Layout- Beyond

More information

Uniform Resource Locators (URL)

Uniform Resource Locators (URL) The World Wide Web Web Web site consists of simply of pages of text and images A web pages are render by a web browser Retrieving a webpage online: Client open a web browser on the local machine The web

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE IN WEB PROGRAMMING COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING

More information

Fundamentals of Website Development

Fundamentals of Website Development Fundamentals of Website Development CSC 2320, Fall 2015 The Department of Computer Science Events handler Element with attribute onclick. Onclick with call function Function defined in your script or library.

More information

Session 6. JavaScript Part 1. Reading

Session 6. JavaScript Part 1. Reading Session 6 JavaScript Part 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/ JavaScript Debugging www.w3schools.com/js/js_debugging.asp

More information

Working with JavaScript

Working with JavaScript Working with JavaScript Creating a Programmable Web Page for North Pole Novelties 1 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page 2 Objectives

More information

HTML. HTML Evolution

HTML. HTML Evolution Overview stands for HyperText Markup Language. Structured text with explicit markup denoted within < and > delimiters. Not what-you-see-is-what-you-get (WYSIWYG) like MS word. Similar to other text markup

More information

Html basics Course Outline

Html basics Course Outline Html basics Course Outline Description Learn the essential skills you will need to create your web pages with HTML. Topics include: adding text any hyperlinks, images and backgrounds, lists, tables, and

More information

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148 Index Numbers & Symbols (angle brackets), in HTML, 47 : (colon), in CSS, 96 {} (curly brackets), in CSS, 75, 96. (dot), in CSS, 89, 102 # (hash mark), in CSS, 87 88, 99 % (percent) font size, in CSS,

More information

URLs and web servers. Server side basics. URLs and web servers (cont.) URLs and web servers (cont.) Usually when you type a URL in your browser:

URLs and web servers. Server side basics. URLs and web servers (cont.) URLs and web servers (cont.) Usually when you type a URL in your browser: URLs and web servers 2 1 Server side basics http://server/path/file Usually when you type a URL in your browser: Your computer looks up the server's IP address using DNS Your browser connects to that IP

More information

Client vs Server Scripting

Client vs Server Scripting Client vs Server Scripting PHP is a server side scripting method. Why might server side scripting not be a good idea? What is a solution? We could try having the user download scripts that run on their

More information

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web Objectives JavaScript, Sixth Edition Chapter 1 Introduction to JavaScript When you complete this chapter, you will be able to: Explain the history of the World Wide Web Describe the difference between

More information