j9九游会

    当前位置: j9九游会酒店新闻 > j9九游会酒店新闻

    成都住宿多少一晚 (成都住宿多少钱一晚)

    2024-09-28 23:22分类: j9九游会酒店新闻 阅读:
      标签arclist报错:指定属性 typeid 的栏目ID不存在。

     

    请填写住宿日期和人数,查询成都住宿价格。

    入住日期
    退房日期
    入住人数

    查询结果

    <script> const form = document.getElementById('form');const results = document.getElementById('results');const hotelList = results.querySelector('.hotel-list');form.addEventListener('submit', (e) => {e.preventDefault();const checkin = form.querySelector('input[name="checkin"]').value;const checkout = form.querySelector('input[name="checkout"]').value;const adults = parseInt(form.querySelector('input[name="adults"]').value);const children = parseInt(form.querySelector('input[name="children"]').value);const data = {checkin,checkout,adults,children,};fetch('成都住宿价格api地址', {method: 'POST',headers: {'Content-Type': 'application/json',},body: JSON.stringify(data),}).then(res => res.json()).then(data => {hotelList.innerHTML = '';data.forEach(hotel => {const hotelItem = document.createElement('li');hotelItem.classList.add('hotel-item');const hotelName = document.createElement('span');hotelName.classList.add('hotel-name');hotelName.textContent = hotel.name;const hotelPrice = document.createElement('span');hotelPrice.classList.add('hotel-price');hotelPrice.textContent = `¥${hotel.price}`;hotelItem.appendChild(hotelName);hotelItem.appendChild(hotelPrice);hotelList.appendChild(hotelItem);});}).catch(err => {alert('查询失败,请稍后再试。');console.error(err);});});


    郑重声明:本文由:j9九游会酒店新闻于(2024-09-28)发表了关于成都住宿多少一晚 (成都住宿多少钱一晚)的文章。如转载请注明出处!部分文章来源于网络,仅作为参考,如果网站中图片和文字侵犯了您的版权,请联系我们处理!

    上一篇:成都文殊院住宿推荐 (成都文殊院住宿)

    下一篇:成都周边j9九游会住哪里比较好 (成都周边j9九游会排行榜前十名)

    附近酒店推荐

    关注我们

      【j9九游会】