1. Trang chủ
  2. » Luận Văn - Báo Cáo

Lecture Web technologies and programming – Lecture 19: Working with Background and Images - TRƯỜNG CÁN BỘ QUẢN LÝ GIÁO DỤC THÀNH PHỐ HỒ CHÍ MINH

10 11 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

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

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

User Inputs bgcolor in Prompt Box. After Applying bgcolor[r]

Trang 1

1

Trang 2

2

Trang 3

Dialog boxes in JavaScript

Alert box

Prompt box

Confirm box

What is DOM?

HTML DOM

Retrieving HTML elements

getElementById()

innerHTML

getAttribute()

setAttribute()

3

Trang 4

HTML DOM Elements

Finding HTML Elements

Find an element by element

Find elements by tag

Find elements by class name

4

Trang 5

Controlling the background

dynamically

Working with images

Date Object

5

Trang 6

The body tag has the following attributes

Bgcolor

It is Background Color

Background

It deals with the Background Image

It is the text user sees in the browser

6

Trang 7

We can access the bgcolor by

following methods:

document.body.bgColor

document.getElementById(“id of the body tag”).bgColor

7

Trang 8

Starting Function

User Input

Setting bgcolor

Calling Function

8

Trang 9

User Inputs bgcolor in Prompt Box

After Applying bgcolor

9

Trang 10

Set a background color for a

document:

We can access the body text by

following methods:

document.body.style.color

document.getElementById(“id of the body tag”).style.color

10

Ngày đăng: 01/04/2021, 02:16

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w