Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在使用此代码来触发覆盖:
<body onload="toggleOverlay();">
如何以毫秒或秒为单位将其延迟设定的时间?
您可以使用 setTimeout() 延迟 toggleOverlay() 的执行。
onload="setTimeout('toggleOverlay()', 1000);
页面加载时,setTimeout 已执行,但 toggleOverlay 尚未执行。