Đang chuẩn bị liên kết để tải về tài liệu:
Học JavaScript qua ví dụ part 96

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

Gỡ rối Ajax với Firebug Firebug (hình 18,26) là một mở rộng của Firefox cho phép bạn gỡ lỗi và hồ sơ của bạn Ajax, HTML, CSS, JavaScript, và DOM các ứng dụng bằng cách sử dụng duyệt web theo thẻ và một giao diện điều khiển cho các lỗi và thông báo đăng nhập. | 848 Chapter 18 An Introduction to Ajax with JSON Figure 18.25 After parsing the JSON string. 18.6 Debugging Ajax with Firebug Firebug see Figure 18.26 is a Firefox extension that lets you debug and profile your Ajax HTML CSS JavaScript and DOM applications by using tabbed browsing and a console for errors and log messages. Firebug appears either as a separate window or as a small panel at the bottom of your browser. The FireBug console can log all Ajax requests live and allows you to inspect the responses that are normally invisible. You can see the value of the XMLHttpRequest object the server s status the readyState and so on. and with the Script debugger step through the your program line by line or stop at specified breakpoints watching the changes in real time. Firebug s inspectors allow you to see the CSS rules and watch DOM nodes as they are being created modified and removed by JavaScript in real time. Firebug s Script tab contains a powerful debugger that lets you pause JavaScript execution on any line. You can then step forward line-byline to analyze how the state of the program changes in real time. Firebug also lets you specify the circumstances under which a breakpoint is triggered and lets you browse code as well as edit it. From the Library of WoweBook.Com 18.6 Debugging Ajax with Firebug 849 Figure 18.26 The Firebug Web site. From the Library of WoweBook.Com 850 Chapter 18 An Introduction to Ajax with JSON If you want to test your pages in Internet Explorer Opera and Safari the solution is Firebug Lite a JavaScript file you can insert into your pages to simulate some Firebug features in browsers that are not named Firefox. Firebug Lite creates the variable firebug and doesn t affect or interfere with HTML elements that aren t created by itself. Go to http getfirebug.com for more information. Figure 18.27 shows Firebug in its own window with breakpoints. The yellow arrow on the left is the line that is currently executing. The problem Firefox returns

crossorigin="anonymous">
Đã 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.