dynamic-button-01a.html (226B)
1 <!DOCTYPE html> 2 <style> 3 .test::after { 4 content:"::after content"; 5 } 6 </style> 7 8 <button> 9 Button contents 10 </button> 11 <script> 12 var td = document.querySelector("button"); 13 td.offsetWidth; 14 td.className = "test"; 15 </script>