Đang chuẩn bị liên kết để tải về tài liệu:
JavaScript FOR ™ DUMmIES phần 7

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

để trao đổi hình ảnh được đặt tên mkt_pic từ phiên bản màu trắng lên phiên bản màu tímBạn có thể tìm thấy một phiên bản làm việc của mã này chịu trách nhiệm hình và trong đó bao gồm các chức năng trao đổi () cũng như các mã sau trên | Chapter 11 Creating Pop-Up Help Tooltips 209 Putting it all together Using DHTML code to create simple tooltips Sometimes you find it useful to experiment with a working script containing all the necessary elements for DHTML tooltips HTML code that defines the active areas for which you want to create tooltips style sheet code that defines how you want your tooltips to appear and JavaScript code that tells the Web browser to display or hide the appropriate tooltips depending on mouse pointer position. In Listing 11-5 a complete working script is exactly what you find. Listing 11-5 pulls together the code you see in Listings 11-1 through 11-4 to demonstrate how each piece fits together. You can find the code in Listing 11-5 on the companion CD under the filename list1105.htm. Listing 11-5 The Whole Enchilada A Working Tooltip Script HTML HEAD TITLE Tooltip Example from JavaScript For Dummies 4th Edition TITLE SCRIPT type text javascript language Javascript -- Hide script from older browsers if document.getElementById latestBrowser true else latestBrowser false function displayTip theEvent currentElement if latestBrowser tooltip document.getElementById currentElement .style else tooltip eval document. currentElement if document.all tooltip.pixelTop parseInt theEvent.y 2 tooltip.pixelLeft Math.max 2 parseInt theEvent.x -75 else if latestBrowser tooltip.top parseInt theEvent.pageY 2 px continued 210 Part III Making Your Site Easy for Visitors to Navigate and Use Listing 11-5 continued tooltip.left Math.max 2 parseInt theEvent.pageX -75 px else tooltip.top parseInt theEvent.pageY 2 tooltip.left Math.max 2 parseInt theEvent.pageX -75 tooltip.visibility visible function hideTip currentElement if latestBrowser tooltip document.getElementById currentElement .style else tooltip eval document. currentElement tooltip.visibility hidden End hiding script -- SCRIPT STYLE type text css -- .tooltipStyle background-color pink border pink 1px solid layer-background-color pink width .

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.