THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng | |
---|---|
Số trang | 65 |
Dung lượng | 2,3 MB |
Nội dung
Ngày đăng: 12/08/2014, 19:21
Nguồn tham khảo
Tài liệu tham khảo | Loại | Chi tiết |
---|---|---|
2. Check to make sure that the document doesn’t use frames by testing the length of the frames array; if the length is less than 1, then there are no frames:if (frames.length < 1) { | Khác | |
3. If the page has no frames, remove any background images by setting document.body.background to an empty string:document.body.background = ‘’ | Khác | |
4. Use the window.prompt method to ask the user to enter a back- ground color, and save the result returned in document.bgColor : document.bgColor = window.prompt(‘Enter a background ặ color:’) | Khác | |
5. Place the last line inside a void statement; otherwise, Netscape browsers will actually try to display the value entered by the user in the dialog box after applying it to the page, and this will cause the page in question to disappear:void(document.bgColor = window.prompt(‘Enter a ặ background color:’)) | Khác | |
6. Close the if block so that the script looks like this:if (frames.length < 1) {document.body.background = ‘’ | Khác |
TÀI LIỆU CÙNG NGƯỜI DÙNG
TÀI LIỆU LIÊN QUAN