香港航空、香港机票、香港自由行、香港航班、特价机票 (2024)

无航班记录。

city list

'+ '

'; var str = ''; for (var b = 0; b < country.city.length; b++) { var obj = country.city[b]; citysData.push([obj.number,obj.name]) str += '

' + obj.name + '(' + obj.number + ')'+ '

'+ '

'; } countryHtml += str + '

' } html += newHtml + countryHtml + ''; } $('.city-list-div').html(''); $('.city-list-div').append($(html)); if ($('#flight-schedule').size() !== 0) { var recordScheduleDep = (getCookie("flightScheduleFrom") === "") ? [] : decodeURIComponent(getCookie("flightScheduleFrom")).split(','); //country-from if (recordScheduleDep.length > 0 && $("#flight-schedule .flight-schedule-from-popup .list .column-1 .recentSearchGroup").size() === 0) { var html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordScheduleDep.length - 1; i >= 0; i--) { var code1 = recordScheduleDep[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; $("#flight-schedule .flight-schedule-from-popup .list .column-1").prepend(html); } var recordScheduleRet = (getCookie("flightScheduleTo") === "") ? [] : decodeURIComponent(getCookie("flightScheduleTo")).split(','); //country-from //country-to if (recordScheduleRet.length > 0 && $("#flight-schedule .flight-schedule-to-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordScheduleRet.length - 1; i >= 0; i--) { var code1 = recordScheduleRet[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#flight-schedule .flight-schedule-to-popup .list .column-1").prepend(html); } }; if ($('#flight-status').size() !== 0) { var recordStatusRet = (getCookie("flightStatusFrom") === "") ? [] : decodeURIComponent(getCookie("flightStatusFrom")).split(','); //country-from //country-to if (recordStatusRet.length > 0 && $("#flight-status .flight-status-from-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordStatusRet.length - 1; i >= 0; i--) { var code1 = recordStatusRet[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#flight-status .flight-status-from-popup .list .column-1").prepend(html); } var recordStatusTo = (getCookie("flightStatusTo") === "") ? [] : decodeURIComponent(getCookie("flightStatusTo")).split(','); //country-from //country-to if (recordStatusTo.length > 0 && $("#flight-status .flight-status-to-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordStatusTo.length - 1; i >= 0; i--) { var code1 = recordStatusTo[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#flight-status .flight-status-to-popup .list .column-1").prepend(html); } }; if ($('#lost-found').size() !== 0) { var recordLostFoundFrom = (getCookie("lostFoundFrom") === "") ? [] : decodeURIComponent(getCookie("lostFoundFrom")).split(','); if (recordLostFoundFrom.length > 0 && $("#lost-found .lost-found-from-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordLostFoundFrom.length - 1; i >= 0; i--) { var code1 = recordLostFoundFrom[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#lost-found .lost-found-from-popup .list .column-1").prepend(html); } }; // contact-stroke contact-stroke-from1-popup if ($('#contact-stroke').size() !== 0) { var recordContactStrokeFrom = (getCookie("contactStrokeFrom") === "") ? [] : decodeURIComponent(getCookie("contactStrokeFrom")).split(','); if (recordContactStrokeFrom.length > 0 && $("#contact-stroke .contact-stroke-from1-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeFrom.length - 1; i >= 0; i--) { var code1 = recordContactStrokeFrom[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-from1-popup .list .column-1").prepend(html); } // contact-stroke contact-stroke-from1-popup var recordContactStrokeTo = (getCookie("contactStrokeTo") === "") ? [] : decodeURIComponent(getCookie("contactStrokeTo")).split(','); if (recordContactStrokeTo.length > 0 && $("#contact-stroke .contact-stroke-to1-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeTo.length - 1; i >= 0; i--) { var code1 = recordContactStrokeTo[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-to1-popup .list .column-1").prepend(html); } // contact-stroke contact-stroke-from1-popup var recordContactStrokeFromEnd = (getCookie("contactStrokeFromEnd") === "") ? [] : decodeURIComponent(getCookie("contactStrokeFromEnd")).split(','); if (recordContactStrokeFromEnd.length > 0 && $("#contact-stroke .contact-stroke-from-end-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeFromEnd.length - 1; i >= 0; i--) { var code1 = recordContactStrokeFromEnd[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-from-end-popup .list .column-1").prepend(html); } // contact-stroke contact-stroke-from1-popup var recordContactStrokeToEnd = (getCookie("contactStrokeToEnd") === "") ? [] : decodeURIComponent(getCookie("contactStrokeToEnd")).split(','); if (recordContactStrokeToEnd.length > 0 && $("#contact-stroke .contact-stroke-to-end-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeToEnd.length - 1; i >= 0; i--) { var code1 = recordContactStrokeToEnd[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-to-end-popup .list .column-1").prepend(html); } }; }, complete: function(XMLHttpRequest, textStatus){ } }); } getCityList() })

无航班记录。

city list

'+ '

'; var str = ''; for (var b = 0; b < country.city.length; b++) { var obj = country.city[b]; citysData.push([obj.number,obj.name]) str += '

' + obj.name + '(' + obj.number + ')'+ '

'+ '

'; } countryHtml += str + '

' } html += newHtml + countryHtml + ''; } $('.city-list-div').html(''); $('.city-list-div').append($(html)); if ($('#flight-schedule').size() !== 0) { var recordScheduleDep = (getCookie("flightScheduleFrom") === "") ? [] : decodeURIComponent(getCookie("flightScheduleFrom")).split(','); //country-from if (recordScheduleDep.length > 0 && $("#flight-schedule .flight-schedule-from-popup .list .column-1 .recentSearchGroup").size() === 0) { var html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordScheduleDep.length - 1; i >= 0; i--) { var code1 = recordScheduleDep[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; $("#flight-schedule .flight-schedule-from-popup .list .column-1").prepend(html); } var recordScheduleRet = (getCookie("flightScheduleTo") === "") ? [] : decodeURIComponent(getCookie("flightScheduleTo")).split(','); //country-from //country-to if (recordScheduleRet.length > 0 && $("#flight-schedule .flight-schedule-to-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordScheduleRet.length - 1; i >= 0; i--) { var code1 = recordScheduleRet[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#flight-schedule .flight-schedule-to-popup .list .column-1").prepend(html); } }; if ($('#flight-status').size() !== 0) { var recordStatusRet = (getCookie("flightStatusFrom") === "") ? [] : decodeURIComponent(getCookie("flightStatusFrom")).split(','); //country-from //country-to if (recordStatusRet.length > 0 && $("#flight-status .flight-status-from-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordStatusRet.length - 1; i >= 0; i--) { var code1 = recordStatusRet[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#flight-status .flight-status-from-popup .list .column-1").prepend(html); } var recordStatusTo = (getCookie("flightStatusTo") === "") ? [] : decodeURIComponent(getCookie("flightStatusTo")).split(','); //country-from //country-to if (recordStatusTo.length > 0 && $("#flight-status .flight-status-to-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordStatusTo.length - 1; i >= 0; i--) { var code1 = recordStatusTo[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#flight-status .flight-status-to-popup .list .column-1").prepend(html); } }; if ($('#lost-found').size() !== 0) { var recordLostFoundFrom = (getCookie("lostFoundFrom") === "") ? [] : decodeURIComponent(getCookie("lostFoundFrom")).split(','); if (recordLostFoundFrom.length > 0 && $("#lost-found .lost-found-from-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordLostFoundFrom.length - 1; i >= 0; i--) { var code1 = recordLostFoundFrom[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#lost-found .lost-found-from-popup .list .column-1").prepend(html); } }; // contact-stroke contact-stroke-from1-popup if ($('#contact-stroke').size() !== 0) { var recordContactStrokeFrom = (getCookie("contactStrokeFrom") === "") ? [] : decodeURIComponent(getCookie("contactStrokeFrom")).split(','); if (recordContactStrokeFrom.length > 0 && $("#contact-stroke .contact-stroke-from1-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeFrom.length - 1; i >= 0; i--) { var code1 = recordContactStrokeFrom[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-from1-popup .list .column-1").prepend(html); } // contact-stroke contact-stroke-from1-popup var recordContactStrokeTo = (getCookie("contactStrokeTo") === "") ? [] : decodeURIComponent(getCookie("contactStrokeTo")).split(','); if (recordContactStrokeTo.length > 0 && $("#contact-stroke .contact-stroke-to1-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeTo.length - 1; i >= 0; i--) { var code1 = recordContactStrokeTo[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-to1-popup .list .column-1").prepend(html); } // contact-stroke contact-stroke-from1-popup var recordContactStrokeFromEnd = (getCookie("contactStrokeFromEnd") === "") ? [] : decodeURIComponent(getCookie("contactStrokeFromEnd")).split(','); if (recordContactStrokeFromEnd.length > 0 && $("#contact-stroke .contact-stroke-from-end-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeFromEnd.length - 1; i >= 0; i--) { var code1 = recordContactStrokeFromEnd[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-from-end-popup .list .column-1").prepend(html); } // contact-stroke contact-stroke-from1-popup var recordContactStrokeToEnd = (getCookie("contactStrokeToEnd") === "") ? [] : decodeURIComponent(getCookie("contactStrokeToEnd")).split(','); if (recordContactStrokeToEnd.length > 0 && $("#contact-stroke .contact-stroke-to-end-popup .list .column-1 .recentSearchGroup").size() === 0) { html = ''; html += '

'; html += '

' + '最近搜索' + '

'; html += '

'; for (i = recordContactStrokeToEnd.length - 1; i >= 0; i--) { var code1 = recordContactStrokeToEnd[i].split('(')[1] var code = code1.split(')')[0] html += '

' + getCityName(code) + '(' + code + ')' + '

'; } html += '

'; html += '

'; // .column-1 $("#contact-stroke .contact-stroke-to-end-popup .list .column-1").prepend(html); } }; }, complete: function(XMLHttpRequest, textStatus){ } }); } getCityList() })

As an expert in web development and programming, it's clear that the provided code snippet is written in JavaScript and is related to a web application that involves flight schedules, city lists, recent searches, and pop-up functionalities. The code seems to be responsible for dynamically generating HTML content based on user interactions and stored data in cookies.

Let me break down the key concepts and functionalities used in the code:

  1. City List Generation:

    • The code generates a city list dynamically, presumably for selecting departure and destination cities for flights.
    • It iterates over a list of countries and their cities, extracting city names and corresponding numbers.
    • The generated HTML is then appended to a specified div element with the class 'city-list-div'.
  2. Flight Schedule Handling:

    • The code handles flight schedules, including departure and arrival cities.
    • It uses cookies to store and retrieve recent search history for flight schedules.
    • The script checks if there is a flight schedule section on the webpage and populates it with recent search history if available.
  3. Flight Status Handling:

    • Similar to flight schedules, the code handles flight status information.
    • It uses cookies to store and retrieve recent search history for flight status.
    • The script populates the flight status section on the webpage with recent search history if available.
  4. Lost and Found Handling:

    • The code includes functionality for handling lost and found items related to specific cities.
    • It uses cookies to store and retrieve recent search history for lost and found information.
  5. Contact Stroke Handling:

    • There is a section related to "contact stroke," and the code handles various aspects of it.
    • Similar to the previous functionalities, it uses cookies to store and retrieve recent search history for contact strokes.
    • The script populates different sections related to contact strokes with recent search history if available.
  6. Asynchronous Request:

    • The code utilizes an asynchronous AJAX request, presumably to fetch additional data or perform some background tasks.
    • It appears to be part of a larger web application, interacting with a server to get city lists or other related data.

In summary, the provided JavaScript code is a part of a web application that involves handling various functionalities related to flights, including city lists, flight schedules, flight status, lost and found, and contact strokes. The use of cookies indicates an effort to provide a personalized and user-friendly experience by remembering recent user interactions.

香港航空、香港机票、香港自由行、香港航班、特价机票 (2024)

References

Top Articles
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 5916

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.