HTML In my html I have an element with id ="check1"
<span id="check1"></span>
JAVASCRPIT I have a variable a='1', which is coming from somewhere else. Now, I want the inner HTML of span element to be "correct" with the help of reference to its id, and using 'a'.
var a = 1;
$.(#**checka**).innerHTML="correct"
How to write the id ??
document.getElementById("check" + a).innerHTML = "correct";if using jquery:$("#check" + a).html("correct");