I want to do something like
if(something.val() == 'string1')
{
something.val('string2');
}
else if(something.val() == 'string2')
{
something.val('string1')
}
But in one line of code. I can't quite remember how it's done, but it involves question marks and colons...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…