I have this code and it is not working It is just for testing.
HTML
<a id="sp">test</a></li>
JavaScript
document.getElementById('sp').innerHTML = 'test1';
var a == 'undefined'
IF (a == "undefined"){
document.getElementById('sp').innerHTML = 'inline';
}ELSE{
document.getElementById('sp').innerHTML = 'inline1';
}
The code is not entering the if. Can anyone help me?
In the assigning you change to
var a = "undefined"and not==