TAILIEUCHUNG - XML Step by Step- P20

XML Step by Step- P20:Extensible Markup Language, or XML, is currently the most promising language for storing and exchanging information on the World Wide Web. Although Hypertext Markup Language (HTML) is presently the most common language used to create Web pages, HTML has a limited capacity for storing information. In contrast, because XML allows you to create your own elements, attributes, and document structure, you can use it to describe virtually any kind of information from a simple recipe to a complex database | Chapter 10 Displaying XML Documents Using Data Binding 351 BUTTON ONCLICK FindBooks Search BUTTON HR Results P DIV ID ResultDiv DIV SCRIPT LANGUAGE JavaScript function FindBooks SearchString if SearchString ltYou must enter text into Title text box. gt return ResultHTML while TitleString TITLE .value if .indexOf SearchString 0 ResultHTML I TITLE I B AUTHOR B BINDING PAGES pages PRICE P Data Binding 10 352 XML Step by Step if ResultHTML ltno books found gt else ResultHTML SCRIPT BODY HTML Listing 10-13. The HTML page displays a TEXT type INPUT element which lets the user enter a single line of search text INPUT TYPE TEXT ID SearchText The page also displays a BUTTON element labeled Search BUTTON ONCLICK FindBooks Search BUTTON When the user clicks the button the FindBooks script function is called which extracts the search text from the INPUT element searches the titles of all BOOK records in the XML document for the text and then displays the matching BOOK records as shown here The script function FindBooks is contained in its own SCRIPT element and is written in JScript 354 XML Step by Step tip JScript is Microsoft s version of the generic JavaScript scripting language. In the example SCRIPT block the LANGUAGE attribute gives the generic language name. For information on JScript and other Microsoft Web scripting technologies see the topic Scripting in the MSDN Library on the Web at http library . The FindBooks function begins by obtaining the text currently entered into the INPUT element which has the ID SearchText and then using the JScript method toUpperCase to convert the text to uppercase. FindBooks .

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.