tailieunhanh - Ajax For Dumies phần 9

Tham khảo tài liệu 'ajax for dumies phần 9', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 8 Handling XML in Ajax Applications 247 peopleNode Now you need to get the third and last person element inside the people node xml version events event type informal event_title 15th award ceremony event_title event_number 1207 event_number subject gala event subject date 7 4 2006 date people person attendance present first_name Sam first_name last_name Edwards last_name person person attendance absent first_name Sally first_name last_name Jackson last_name person person attendance present person people event events The lastChild property comes in handy once again to get an object corresponding to the correct person element function displayGuest xmldoc var eventsNode eventNode peopleNode eventsNode eventNode peopleNode personNode 248 Part IV In-Depth Ajax Power_ All that s left is to recover the first name and last name of the third guest xml version events event type informal event_title 15th award ceremony event_title event_number 1207 event_number subject gala event subject date 7 4 2006 date people person attendance present first_name Sam first_name last_name Edwards last_name person person attendance absent first_name Sally first_name last_name Jackson last_name person person attendance present first_name Cary first_name last_name Grant last_name person people event events You can get an object corresponding to the first_name and last_name elements with the firstChild and nextSibling properties function displayGuest xmldoc var eventsNode eventNode peopleNode var firstNameNode lastNameNode eventsNode eventNode peopleNode personNode firstNameNode lastNameNode That s great. Now you have JavaScript objects corresponding to the first_name and last_name elements. All

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.