|
var n = 1
var myString = "subject" + n + ".innerHTML";
alert(myString)
alert(subject1.innerHTML)
the first alert = subject1.innerHTML
the 2nd alert = value of subject1.innerHTML
How can I make the first alert show the value of subject2.innerHTML and not the name "subject1.innerHTML"
|
|
|
|
|
|
|
|