tailieunhanh - ASP.NET AJAX Programmer’s Reference - Chapter 2

JavaScript Base Type Extensions Mục tiêu chính của khuôn khổ AJAX phía khách hàng là để cạnh tranh với các khung và. NET càng nhiều càng tốt để mang lại tương tự. NET phong cách lập trình kịch bản phía máy khách của bạn. AJAX JavaScript mở rộng loại cơ sở là bước đầu tiên hướng tới đạt được mục tiêu này. Những phần mở rộng mở rộng chức năng của các loại cơ sở JavaScript chẳng hạn như Array, Boolean, Date, Error Number, Object, và String thêm hỗ trợ cho các phương pháp và tài sản. | JavaScript Base Type Extensions The main goal of the AJAX client-side framework is to emulate the and .NET Framework as much as possible to bring similar .NET-style programming to your client-side scripting. The AJAX JavaScript base type extensions are the first step toward achieving this goal. These extensions extend the functionality of the JavaScript base types such as Array Boolean Date Error Number Object and String to add support for .NET-like methods and properties. As such the AJAX JavaScript base type extensions make client-side programming against these JavaScript base types more like server-side programming against their .NET counterparts as much as possible. The code samples presented in this chapter use a new JavaScript function named pageLoad and a new server control named ScriptManager as shown in the boldfaced portion of Listing 2-1. Listing 2-1 The Page Used by the Examples @ Page Language C html xmlns http 1999 xhtml head runat server title Untitled Page title script language JavaScript type text javascript function pageLoad . . . script head body form id forml runat server asp ScriptManager ID ScriptManagerl runat server form body html Chapter 2 JavaScript Base Type Extensions I ll discuss the pageLoad JavaScript function and ScriptManager server control in detail in future chapters. For now here are two key concepts One of the responsibilities of the ScriptManager server control is to download the AJAX client-side framework to the requesting browser to make it available to the browser s JavaScript engine. The AJAX client-side framework automatically calls the pageLoad JavaScript function after the page and the related client-side scripts are completely loaded. AJAX Array Type Extensions The .NET Array type features methods such as Clone Add Clear Contains IndexOf Insert Remove and RemoveAt. The AJAX client-side framework extends the JavaScript Array type to add .

TÀI LIỆU MỚI ĐĂNG
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.