javascript - Changing a value of a html tag -
i using inside page <span>
tag
<span class="class_name">1500</span>
and have javascript code change "1500" 15%
my question how read number inside span , print new number
want example code.
try this
<span id="thisspan" class="whateverclass">1500</span> <div id="thevalueis"></div> <script> document.getelementbyid("thevalueis").innerhtml=document.getelementbyid("thisspan").innerhtml; </script>
i hope got question right. :)
Comments
Post a Comment