gpt4 book ai didi

javascript - 没有找到目标 DOM 元素?

转载 作者:行者123 更新时间:2023-11-30 19:56:16 25 4
gpt4 key购买 nike

我正在通过 TimeKit.io 使用,但日历不会显示?

代码如下:

HTML:

    <div id="bookingjs"></div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" defer></script>
<script src="https://cdn.timekit.io/booking-js/v2/booking.min.js" defer></script>

JS(在窗口加载时调用并通过控制台消息验证):

     function yourfunction() {
console.log("yourFunction called to setup timekit.io");
window.timekitBookingConfig = {
app_key: 'test_widget_key_rVo9n2x1Js1J7OIh16',
project_id: '19e3d150-5fc16802ac7',
autoload: true,
el: 'bookingjs',
debug: true,
availability: {
mode: 'roundrobin_random',
length: '4 hours',
from: '-1 hour',
to: '8 weeks',
ignore_all_day_events: false
},
reminders: [
{
type: 'jn@getme.com',
settings: {
recipient: 'owner',
subject: 'Scheduled Delivery firing in 80 min or less'
},
when: {
type: 'before',
unit: 'mins',
time: 80
}
}
],
customer_fields: {
name: {
title: 'Full name',
prefilled: 'Scheduling System',
readonly: true
},
email: {
title: 'E-mail',
prefilled: 'info@getme.com',
readonly: true
},
comment: {
title: 'Comment',
prefilled: false,
required: true,
readonly: false,
format: 'textarea'
},
phone: {
title: 'End Customer Mobile Number',
prefilled: false,
required: false,
readonly: false,
format: 'tel'
}
},
callbacks: {
createBookingSuccessful: function(response) {},
createBookingFailed: function(response) {},
submitBookingForm: function(values) {},
errorTriggered: function(message) {}
}
}
console.log("Timiekit done setting up");
}

最佳答案

按 ID 而非标签名称定位。

el: '#bookingjs'

关于javascript - 没有找到目标 DOM 元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53954657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com