当我将伪元素插入div元素时,我遇到了一个棘手的情况。这是我的html结构。
<div class="collections-list">
<div class="collection">...</div>
<div class="collection">...</div>
<div class="collection">...</div>
(where I want to put the pseudo element)
<
我有个问题。在网页中,我有一个显示计数器( PHP变量,$count) DIV。我还有一个更改DIV的INNERHTML属性的JS函数。我不能在更改PHP变量时更改js var。
HTML
<DIV id="counter">0</DIV>
PHP
while (----) {
do_something;
$count++;
}
JS
function ChangeDiv() {
document.getElementById("counter").innerHTML = // here the value of $count;