Lecture Introduction to web engineering - Lec 22: Working with background, images and date object

After studying this chapter you will be able to understand: Dialog boxes in JavaScript, HTML DOM, retrieving HTML elements, setting HTML elements, controlling the background dynamically, working with images, date object. | Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1 Dialog boxes in JavaScript HTML DOM Retrieving HTML elements Setting HTML elements Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 2 Controlling the background dynamically Working with images Date Object Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 3 The body tag has the following attributes bgcolor Background text Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 4 We can access the bgcolor as Or (“id of the body tag”).bgColor Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 5 Starting the function User input Setting the bgcolor Calling the function Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 6 We can access the body text as Or (“id of the body tag”). Basharat . | Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1 Dialog boxes in JavaScript HTML DOM Retrieving HTML elements Setting HTML elements Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 2 Controlling the background dynamically Working with images Date Object Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 3 The body tag has the following attributes bgcolor Background text Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 4 We can access the bgcolor as Or (“id of the body tag”).bgColor Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 5 Starting the function User input Setting the bgcolor Calling the function Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 6 We can access the body text as Or (“id of the body tag”). Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 7 Set text function Setting the color Calling the function Passing color as parameter Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 8 We can access the background as Or (“id of the body tag”).background Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 9 Image is added Function is called Src is passed Function received the src Background is set Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 10 JavaScript has a built-in object called Image The Image object allows you to create objects that represent images created using the element Properties: name, border, height, width, hspace, vspace, src Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 11 An image object can be created as var objname= new image() The most important property of an image object is src This .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.