Hello all,
i am new to JavaScript, I am trying to get a div tag value using javascript. i have a div tag in html like this
<div id="para1"> </div>
there is another javascript that do some calculation and sets the result to para1 tag to display.
now i want to use this value somewhere else, I am trying
var temp = document.getElementById("para1");
var save_temp = temp.innerHTML;
but variable save_temp always get an empty value. i have no idea what to do, any help would b really appriciated.
thanks
i am new to JavaScript, I am trying to get a div tag value using javascript. i have a div tag in html like this
<div id="para1"> </div>
there is another javascript that do some calculation and sets the result to para1 tag to display.
now i want to use this value somewhere else, I am trying
var temp = document.getElementById("para1");
var save_temp = temp.innerHTML;
but variable save_temp always get an empty value. i have no idea what to do, any help would b really appriciated.
thanks