TAILIEUCHUNG - the book of javascript 2nd edition phần 5

Ebook này sẽ cung cấp thêm cho các bạn yêu thích lập trình Javar thêm nhiều thông tin lí thú. Tổng quan về JavaScript, Sử dụng JavaScript, Hàm và đối tượng, Tạo đối tượng trong JavaScript, Sự kiện trong JavaScript. | The pages in Figure 10-3 are set next to each other because o in Figure 10-2 tells the browser to set up two frames arrange them in columns and make the first column take up 30 percent of the page and the second column the rest of the page. Adding more percentages their sum can t exceed 100 to the cols element adds more frames to the page. Alternatively using the rows element stacks frames on top of each other. You can tweak frame sets in dozens of ways. Any good book about HTML devotes a chapter to them. The two lines after o tell the browser which HTML pages to load into each frame. Line loads into the first frame named nav and the next line loads into the second frame named contents . Line closes the frame set. Notice that you don t use body tags in defining a frame set. The next two HTML pages are standard web pages. The first page contains three links each leading to a news site. Clicking a link loads the contents into the contents frame because each link contains the element target contents see . We ll see shortly how to use JavaScript to do the same thing. Frames and JavaScript In HTML the only way an action in one frame can change the contents of another is through standard HTML links. Fortunately JavaScript allows you to expand your repertoire of frame tricks immensely. The JavaScript in Figure 10-4 for example makes the contents of the right frame change when a visitor mouses over one of the links on the left. The pages and are the same as in Figure 10-2 only has changed. html head title Nav title script type text javascript -- hide me from older browsers o function changeContents the_url var content_frame the_url show me -- script head body h1 News navigation h1 a href http onMouseOver changeContents http Wired News a br a href http onMouseOver changeContents http .

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.