CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.

Slides:



Advertisements
Similar presentations
JavaScript and AJAX Jonathan Foss University of Warwick
Advertisements

Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
CSCI 3100 Tutorial 6 Web Development Tools 1 Cuiyun GAO 1.
Programming Club IIT Kanpur. Work environment Before you begin coding,always set up your work environment to your needs IDE Notepad++ Sublime Text 2.
CSS. CSS, or Cascading Styles Sheets, is a way to style HTML. Whereas the HTML is the content, the style sheet is the presentation of that document.
CSCI 3100 Tutorial 8 Web Development Tools 1
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Creating a Basic Web Page
Key question  What are the three standardized core languages used to implement web pages? Write the full name not the abbreviation and describe the “layer”
Yahoo! User Interface (YUI) Library Natly Mekdara.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
JQuery 10/21. Today jQuery Some cool tools around the web JavaScript Libraries Drawing libraries HTML Frameworks Conventions.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
DOM and JavaScript Aryo Pinandito.
Styling and theming Build campaigns in style. What we'll look at... How a web document is structured How HTML and CSS fit together Tools you will need.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Creating an Animated Web Page
Working with Objects Creating a Dynamic Web Page.
XP Tutorial 4 New Perspectives on JavaScript, Comprehensive1 Working with Objects Creating an Animated Web Page.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
Mobile web Sebastian Lopienski IT Technical Forum 29 June 2012.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
UPLOAD / DOWNLOAD april  HTML5 is just the next iteration of HTML  Previous version was technically HTML 4.01, which incorporated XHTML 1.0.
Advanced Web Development Instructor: Thomas Bombach.
Web Development 101 Presented by John Valance
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
Cascading Style Sheets Creating a Uniform Site. Style Sheets  Style sheets are used for conformity on a web page or web site.  Style sheets eliminate.
Cascading Style Sheets
Unleash the Power of jQuery Learning & Development Team Telerik Software Academy.
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
Web Technologies Lecture 2 HTML and CSS. HTML Hyper Text Markup Language – Describes web documents – Made up of nested HTML markup tags – Tags are the.
JavaScript Introduction. Slide 2 Lecture Overview JavaScript background The purpose of JavaScript A first JavaScript example Introduction to getElementById.
Cascading Style Sheets
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
Javascript Overview. What is Javascript? May be one of the most popular programming languages ever Runs in the browser, not on the server All modern browsers.
CHAPTER 8 AJAX & JSON WHAT IS AJAX? Ajax lets you…
Web Technologies Lecture 8 JQuery. “A fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
CSCI 3100 Tutorial 2 Web Development Tools 1 HTML 5 & CSS 3 1.
CSS Cascading Style Sheets Prepared By
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
The HTML5 logo was introduced by W3C in 2010
JQuery Fundamentals Introduction Tutorial Videos
Tek Raj Chhetri Code for Humans not for machine.
Application with Cross-Platform GUI
Introduction to JavaScript
JavaScript Introduction
A second look at JavaScript
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
MIS JavaScript and API Workshop (Part 2)
Javascript and JQuery SRM DSC.
Introduction to JavaScript
© 2017, Mike Murach & Associates, Inc.
Presentation transcript:

CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong Kong

Objective of This Tutorial What is JavaScript How to add content to your web pages using JavaScript The basic syntax of JavaScript JavaScript together with HTML5 and CSS3 jQuery and Ajax applications Tools for JavaScript Development

JavaScript in a Nutshell video

Highlights of JavaScript JavaScript is not the script version of Java

Highlights of JavaScript JavaScript is not just the front end programming language.

Basic Syntax of JavaScript The Prompt and basic operations What gets return from the code

Basic Syntax of JavaScript Variables Operators Functions Conditional Statements Array Object

Advanced Syntax of JavaScript Functions are also Objects Anonymous functions and callbacks

HTML Integrated with JavaScript The Tag … JavaScript statements … In HTML 4.x or XHTML pages: … JavaScript statements … Put your JavaScript in a separate file (Recommended)

DOM and JavaScript Document Object Model JavaScript interacts with HTML page content via DOM access. window.alert("Warning!") document.write("Hello World!") window.onload = function () {... } document.getElementById("btn1").onclick = sheet; var para = document.createElement("p"); var node = document.createTextNode("This is new."); para.appendChild(node); var element = document.getElementById("div1"); element.appendChild(para);

JavaScript and HTML5 Some new HTML5 tags – New semantic elements like,,, and. – New form control attributes like number, date, time, calendar, and range. – New graphic elements: and. – New multimedia elements: and. Drag and Drop (code) Animation (code)

JavaScript and CSS3 CSS Primer – Selector p { color: red; font-weight: bold; } – ID #div1 { color: yellow; background-size: auto; } – Class.info { font-family: Arial, Verdana, sans-serif; color: green; } Internal Style Sheet External Style Sheet

JavaScript and CSS3 Some CSS3 new features: – Box Model – Backgrounds and Borders – Gradients – Text Effects – 2D/3D Transformations – Animations Light Effects (code)

jQuery jQuery is the most popular and extensible JavaScript library. Huge resources of plug-in for almost any application you might have. Simple syntax. Include:

jQuery Easy object accessing Easy Ajax Easy event handling JavaScript Code Html Code

Ajax Ajax allows you to communicate with the server in the background. Ajax allows you to display the results on your page without having a page refreshing. Let your pages interact more smoothly with the user. Traditional client-server interactionAjax client-server interaction Delay while loading new or revised pages A whole page must be loaded including many unchanged items

Ajax JQuery allows you to write Ajax in a few lines of code. $.ajax({ type: “POST”, // type url: ‘test’, data: “id=138&price=200” }).done(function(data){ …// callback });

Development Tools Sublime Text, Notepad++, UtraEdit, VIM, Emac, Eclipse, Netbeans, Aptana, WebStorm, Visual Studio, Xcode IDE is strongly recommended.

Debug JavaScript

Some useful APIs Google Map API key Google Chart API Facebook Plugins Twitter API

References