“CSS -Zähler” Code-Antworten

CSS -Zähler

<style>
    body {
        counter-reset: ctr;
    }

    div.fruit::before {
        counter-increment: ctr;
        content: counter(ctr) ".) ";
    }
</style>

<div class="fruit">Apple</div>
<div class="fruit">Banana</div>
<div class="fruit">Orange</div>
Syntax Error

CSS -Zähler

body {
  counter-reset: section;
}

h2::before {
  counter-increment: section;
  content: "Section " counter(section) ": ";
}
naly moslih

JS Increment Safety Value HTML

function addRow(tableID) {

        var table = document.getElementById(tableID);

        var rowCount = document.getElementById(tableID).getElementsByTagName('tbody')
        [1].getElementsByTagName('tr').length;
        var row = table.insertRow(rowCount +1);

        var cell1 = row.insertCell(0);
        var element1 = document.createElement("input");
        element1.type = "hidden";
        element1.name = "Q[]";
        element1.value = rowCount +1;
        cell2.appendChild(element1);
        cell2.innerHTML = rowCount +1;
}

function deleteRow(tableID) {
        try {
        var table = document.getElementById(tableID);
        var rowCount = table.rows.length;

        for(var i=0; i<rowCount; i++) {
            var row = table.rows[i];
            var chkbox = row.cells[0].childNodes[0];
            if(null != chkbox && true == chkbox.checked) {
                table.deleteRow(i);
                rowCount--;
                i--;
            }


        }
        }catch(e) {
            alert(e);
        }
}
KillberkCoding

Ähnliche Antworten wie “CSS -Zähler”

Fragen ähnlich wie “CSS -Zähler”

Weitere verwandte Antworten zu “CSS -Zähler” auf CSS

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen