TAILIEUCHUNG - HTML in 10 Steps or Less- P14

HTML in 10 Steps or Less- P14:Welcome to HTML in 10 Simple Steps or Less. Our mission in writing this book is to provide a quick and accessible way for you to learn Hypertext Markup Language — the lingua franca of the World Wide Web. We hope this book provides a resource that beginning and intermediate HTML coders can use to improve their Web development skills. It is also our hope that it fills multiple roles as both a teaching tool and a reference once you expand your skills. | 236 Part 10 Task 09 Creating Simple Pop-up Windows note You need the hyperlink to create an element that the mouse interacts with. Instead of opening a document you can enter a little JavaScript that creates a new window object. Before you read onward you should understand why pop-up blocking software is so popular. When used intrusively pop-up windows aggravate your visitors experience of your Web site. Use them if at all to enhance the viewing experience not to pummel viewers into submission. In this task you learn how to open a small window with a mouse click. 1. Within the body of your document insert an anchor tag a 2. Define an href attribute for the tag and set it equal to a href 3. Follow the attribute with an onClick event handler as shown here a href onClick 4. Set the event handler equal to as shown here a href onClick 5. Inside the parentheses enter the name of the document inside single quotes that you want displayed in the pop-up window. For example a href onClick 6. Enter a comma and follow the name of the document with the name you want to assign the window object. For example a href onClick myWindow 7. Enter a comma and define the window properties you want to include within single quotes separated by commas. For example a href onClick myWindow width 300 height 200 Please purchase PDF Split-Merge on to remove this watermark. Simple JavaScript Your choices are as follows width specifies the width of the window in pixels height specifies the height of the window in pixels location yes includes the window s address bar toolbar yes includes the window s standard toolbar buttons scrollbars yes includes the window s scrollbars 8. Follow the opening anchor tag with the image or text you want affected and complete the link with a closing anchor tag. Listing 109-1 shows such a link in a document. Figure 109-1 shows the results in a browser. 237 Task

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.