大家好我使用带有计时器选项的javascript。在那里我添加了innerHtml文本。
<?php
if(get_option('popup_delay_auto')=='1') { ?> function countDown(i) {
var int = setInterval(function () {
document.getElementById("ptechsolinside").innerHTML = "You Must Wait Until the Timer Ends " + i;
document.getElementById("ptechsolinside").textContent;
i-- || clearInterval(int) || jQuery('#ptechsolfb').stop().fadeOut('medium') ;
//if i is 0, then stop the interval
}, 1000);
}
countDown(<?php echo get_option('popup_template_count');?>);
<?php } ?>
我将此代码用于25秒的计时器,之后显示内容。我将文本添加为You Must Wait Until the Timer Ends
。当我使用innerHtml时,它会替换#ptechsolinside
的div中的原始内容,并添加“你必须等待直到计时器结束”。我不确定我做错了什么。现在我想显示现有内容和当前内容。我怎么能做到这一点是否有可能提出任何建议。