<a href="#" onclick="test()">click</a> <div id="total_price"></div> <script > function test() { document.getElementById('total_price').innerHTML = '0.00'; } </script>