+ 2
Hey do anyone know why the if statement in func() of class cards is not working properly?
2 ответов
+ 1
The variables (_3, _4, previous_div, previous_para) are assigned the value of the HTMLElement property innerText, a string, not the HTMLObject itself.
So when it comes time to assign the innerText of the HTMLParagraph elements with the desired data(the two cards picked and the first card's div id and paragraph id), it does not happen because the variables(_3, _4, previous_div, previous_para) are strings and HTMLobjects.
For example at line 74 " _3 = a1; " should be "document.getElementById('p14').innerText = a1;" or something to this effect.
I suggest the same for lines 75, 75, 82, 90, and 93.
+ 1
ODLNT THANK U IT REALLY WORKED