Lecture Web technologies and programming – Lecture 20: History, navigator, screen and form objects

Lecture Web technologies and programming – Lecture 20: History, navigator, screen and form objects. After studying this chapter you will be able to understand: History object, navigator object, screen object, form object, accessing form elements, setting form elements, validating form data. | 1 CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr. Tehseen Riaz Abbasi 1 2 3 3 Controlling the background dynamically Bgcolor SET For a document SET For a specific SET the Text Color Return background color of a specific element Return background color of a document: Background background color for a document background image for a document Set a background-image to no-repeat Set the background-image to be fixed Change the position of a background-image 4 Working with images Access an Image Object On MouseOut On MouseOver Image Rollover Image Preview Image Slide Show Date object Digital Clock 5 History object Navigator object Screen object Form object 6 7 The history object contains the URLs visited by the user (within a browser window) The history object is part of the window object and is accessed through the property Used to move forward and backward through the visitor’s browsing history All major browsers support it. 8 History object properties: Length: Returns the number of URLs in the history list History object methods: back(): Loads the previous URL in the history list forward(): Loads the next URL in the history list go(): Loads a specific URL from the history list The object can be written without the window prefix. 9 Writes History Length on Webpage Go Back Function Go Forward Function 10 Body Contents Call to Go Back Function Call to Go Forward Function 11 The navigator object contains information about the visitors browser It also provides several properties that assist in the detection of various elements of the visitor’s browser and environment 12 Navigator object properties: appCodeName: Returns the code name of the browser appName: Returns the name of the browser appVersion: Returns the version information of the browser The properties appName and appCodeName return the name of the browse Navigator object methods: javaEnabled(): Specifies whether or not the browser has Java enabled 13 Used to write . | 1 CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr. Tehseen Riaz Abbasi 1 2 3 3 Controlling the background dynamically Bgcolor SET For a document SET For a specific SET the Text Color Return background color of a specific element Return background color of a document: Background background color for a document background image for a document Set a background-image to no-repeat Set the background-image to be fixed Change the position of a background-image 4 Working with images Access an Image Object On MouseOut On MouseOver Image Rollover Image Preview Image Slide Show Date object Digital Clock 5 History object Navigator object Screen object Form object 6 7 The history object contains the URLs visited by the user (within a browser window) The history object is part of the window object and is accessed through the property Used to move forward and backward through the visitor’s browsing history All major browsers support it. 8 History object properties: .

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.