<script> var countChild = document.getElementById('get-price'); alert('WORK') //работает </script>
what if
<script> var countChild = document.getElementById('get-price').children[1]; alert('WORK') //а тут уже не работает </script>
Moreover, .innerHTML also leads to inoperability. Everything works on a locally saved page, but not on the server. This code is inserted into the VamShop page. Can someone tell me what could be the catch?
document.getElementById('get-price')
returns null, and trying to call properties and methods will result in an error - Specter