Copy dan pastekan di blog pada
<style>.Seriku {
border: 1px solid;
padding: 5px;
width: 250px;
text-align: center;
}
spant.SrE4 {
border: 1px solid;
padding: 5px;
background: red;
}
</style>
<div class="Seriku">
<w id="nmseri"></w><w id="nmseri2"></w>
</div>
<style>.lihat1,.lihat2,.lihat3{display:block;}.Lt4,.Ltnull,.habisnull,.habis1,.habis2,.habis3{display:none;}</style>
<spant onclick="nomerseri()" type="button" class="SrE4">Seri</spant>
<button onclick="hapus()" type="button">hapus</button>
<script>
function nomerseri() {
var kount = Number(window.localStorage.getItem("kountil"));
kount += 1;
window.localStorage.setItem("kountil", kount);
document.getElementById("nmseri").innerHTML = '<style>.SrE4,.Lt1,.Lt2,.Lt3,.lihat'+ kount +'{display: none;}</style><w class="lihat'+ kount +'">Dipakai '+ kount +' kali</w>';
}
function displaykountil() {
const kount = localStorage
.getItem('kountil');
document
.getElementById('nmseri2')
.innerHTML = "<style>.SrE"+ kount +",.lihat"+ kount +"{display: none;}</style><w class='Lt"+ kount +"'>Sudah "+ kount +" kali terpakai.</w><w class='habis"+ kount +"'>Maaf jatah gratis sudah habis.<br/>Silahkan hubungi admin.</w>" ;
}
function hapus() {
localStorage.removeItem('kountil');
}
displaykountil();
</script>