Those. look, i have, let's say div. Type:
<div class='pervyui'></div> And the chip, if the class is equal to this, then you need to change to another. If different, then this one. So, I write this:
function smena(obj) { if (obj.ClassName=='pervuyi') { obj.ClassName='vtoroi'; } else { obj.ClassName='pervuyi'; } } In general, he wrote it in different ways. Tried with two "=" signs, but nothing works. Tell me how it is correct.
And, tried to call function so:
<div OnClick='smena(this)' class='pervyui'></div>