1. Trang chủ
  2. » Công Nghệ Thông Tin

Chapter 3 introduction to javascript

71 1 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 71
Dung lượng 1,07 MB

Nội dung

Chapter Introduction to Javascript Lectured by: Nguyễn Hữu Hiếu JavaScript n n n JavaScript is the programming language of HTML and the Web Programming makes computers what you want them to JavaScript is easy to learn This tutorial will teach you JavaScript from basic to advanced Trường Đại Học Bách Khoa TP.HCM Khoa Khoa Học Kỹ Thuật Máy Tính © 2017 Lập Trình Web Why Study JavaScript? n JavaScript is one of the languages all web developers must learn: n HTML to define the content of web pages CSS to specify the layout of web pages JavaScript to program the behaviour of web pages This lecture is about JavaScript, and how JavaScript works with HTML and CSS Trường Đại Học Bách Khoa TP.HCM Khoa Khoa Học Kỹ Thuật Máy Tính © 2017 Lập Trình Web JavaScript Introduction n n JavaScript Can Change HTML Content One of many HTML methods is getElementById() This example uses the method to "find" an HTML element (with id="demo"), and changes the element content (innerHTML) to "Hello JavaScript”: document.getElementById("demo").innerHTML = "Hello JavaScript”; Trường Đại Học Bách Khoa TP.HCM Khoa Khoa Học Kỹ Thuật Máy Tính © 2017 Lập Trình Web Example What Can JavaScript Do?

JavaScript can change HTML content.

Click Me! Trường Đại Học Bách Khoa TP.HCM Khoa Khoa Học Kỹ Thuật Máy Tính © 2017 Lập Trình Web JavaScript Can Change HTML Attributes This example changes an HTML image, by changing the src attribute of an tag: JavaScript Can Change Images

Ngày đăng: 09/04/2023, 06:48