<span id='amount'>0.00000000</span>
<a class='button-withdraw' id='tombolco' href='#'>Checkout</a>
<script>
var amount = document.getElementById("amount").innerHTML;
if (amount >= 0.001) {
document.GetElementById("tombolco").style = "display:block";
} else {
document.GetElementById("tombolco").style = "display:none";
}
</script>
Why doesn't my code work? What's wrong with it and how can I solve it?
That's not the right way. This is
Also note that it is
getElementById
, not with a capital G. Same with'none'
,Rest of your code is fine.Fiddle