Tìm trường

Hãy để chuyên gia 60+ năm

kinh nghiệm của chúng tôi hỗ trợ

Tìm kiếm
ats.info@ats.org.vn
(+84 28) 39 333 266

Văn phòng Hồ Chí Minh

CN1: Tầng 6, 55 Trương Quốc Dung, Phường 10, Quận Phú Nhuận
CN2: 147 Hai Bà Trưng, Phường Võ Thị Sáu, Quận 3

Văn phòng Đà Nẵng

Tầng 3, Phòng B8, Tòa nhà Diamond, 35 Thái Phiên, Phường Phước Ninh, Quận Hải Châu

Văn phòng Hà Nội

Tầng 14, Tòa nhà VietBank, 70-72 Phố Bà Triệu Phường Tràng Tiền, Quận Hoàn Kiếm
Bản quyền © 2023 ATS. Đã đăng ký Bản quyền.
let country = document.querySelector("#country"); const state = document.getElementById("state"); const city = document.getElementById("city"); function handleSearch() { window.location.href = `?filter={'where':{ 'country':'${country.value}', 'state':'${state.value}', 'city':'${city.value}', 'course':'${course.value}', 'level':'${level.value}', 'cost':'${cost.value}', 'studyCountry':'${studyCountry.value}', 'school':'${school.value}' }}`; } function getQueryParamValue(paramName) { const urlParams = new URLSearchParams(window.location.search); return urlParams.get(paramName); } const fetchCountry = async () => { const response = await fetch("https://ats.live1.vn/api/locations"); const data = await response.json(); const countryOptionEl = document.getElementById("country"); data.forEach((element) => { const option = document.createElement("option"); option.value = element.name; option.text = element.name; countryOptionEl.appendChild(option); }); const country = [{name: "Mỹ", img: "https://ats.org.vn/storage/media/o2rfSpy5mV43o1ROUuJ3a0tJIC3fPeg6nDp5RaBs.jpeg"}, {name: "Anh", img: "https://ats.org.vn/storage/media/nOgXH6VAAyNSXp2Cq60xqGe3422KfbNfQIoCdvfY.jpeg"}, {name: "Úc", img: "https://ats.org.vn/storage/media/3pI3OgIUqR5EsleRpMnPVirZFm3k3KR6d1GKGU4C.jpeg"}, {name: "Canada", img: "https://ats.org.vn/storage/media/fGM4sM9I9wXpvYa7VSgvoR1UxYuZjhE5L4WXHb8j.jpeg"}, {name: "Malaysia", img: "https://ats.org.vn/storage/media/ZjZFhebUPxMlbQOdYwPLwBygHt9VfmUnBEnV9ps6.jpeg"}] const swiper = new Swiper("#swiper2", { slidesPerView: calculateSlidesPerView(), spaceBetween: 30, pagination: { el: ".swiper-pagination", type: "fraction", }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, virtual: { slides: (function () { const slides = country?.map(item => { return `
${item.name}
Sub header
` }); return slides; })(), }, }); window.addEventListener("resize", function () { swiper.params.slidesPerView = calculateSlidesPerView(); swiper.update(); }); function calculateSlidesPerView() { return window.innerWidth <= 991 ? 1 : 4; } }; const fetchState = async () => { const response = await fetch("https://ats.live1.vn/api/states"); const data = await response.json(); const stateOptionEl = document.getElementById("state"); data.forEach((element) => { const option = document.createElement("option"); option.value = element.name; option.text = element.name; stateOptionEl.appendChild(option); }); }; const fetchCity = async () => { const response = await fetch("https://ats.live1.vn/api/cities"); const data = await response.json(); const cityOptionEl = document.getElementById("city"); data.forEach((element) => { const option = document.createElement("option"); option.value = element.id; option.text = element.name; cityOptionEl.appendChild(option); }); }; const fetchSchools = async () => { const response = await fetch(`https://ats.live1.vn/api/schools`); const data = await response.json(); const schoolOptionEl = document.getElementById("school"); data.forEach((element) => { const option = document.createElement("option"); option.value = element.id; option.text = element.name; schoolOptionEl.appendChild(option); }); const swiper = new Swiper("#swiper1", { slidesPerView: calculateSlidesPerView(), spaceBetween: 30, autoplay: { delay: 2000, disableOnInteraction: false, }, pagination: { el: ".swiper-pagination", type: "fraction", }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, virtual: { slides: (function () { const slides = data?.map(item => { return `

${item.name}

` }); return slides; })(), }, }); window.addEventListener("resize", function () { swiper.params.slidesPerView = calculateSlidesPerView(); swiper.update(); }); function calculateSlidesPerView() { return window.innerWidth <= 991 ? 3 : 4; } }; fetchSchools(); fetchCountry(); fetchState(); fetchCity();