问题
I've made a chatbot and deployed it locally on a wordpress website now i want to add a delay so that chatbot auto opens after 5 second the website is loaded, Using javascript.
回答1:
Ok I myself found the answer to this
<script id="gs-sdk" src='//www.buildquickbots.com/botwidget/v2/demo/static/js/sdk.js?v=2' key="5bxxxx1a-xxx2-xxxa-axx2-1xxxxxxxxa" onload="setTimeout(function(){tc.funcs.toggleWidget(true);}, 5000);"></script>
来源:https://stackoverflow.com/questions/54955944/how-to-add-a-delay-to-the-gupshup-chat-so-that-the-chatbot-opens-after-5-seconds