I have two < div > section having numbers inside. When number present in 1st < div > is clicked , 2nd content should show twice the value of 1st < div >.
I used following code but not working.
<div id="left"><a href="#" onclick="document.getElementById('right').innerHTML = (parseInt(document.getElementById('left').innerHTML) + parseInt(document.getElementById('left').innerHTML))">1</a></div>
<div id="right">1</div>
But the output is coming as
NaN
Can somebody help with correct code ? Thanks