Im creating <td>
with jquery function.
And I want to change its value by using js function.
jquery is getting value and putting into table:
tr.append("<td id='stsChange'>" + resul[i].status + "</td>");
I want to change "<td id='stsChange'>"
value if its 1 Pending, else if 2 Success.
Please help me to solve this problem, Thanks!
I have done till here, but its not working.
function insertText () {
var status = document.getElementById('stsChange').innerText;
alert(status);
if(status = "1"){
document.getElementById('stsChange').innerHTML = "Pending";
}
else if(status = "2"){
document.getElementById('stsChange').innerHTML = "Success";
}
}