Iran wants diplomatic relations with the US. Many Iranians have fond memories of the period up to 1979. There had been a lot of sharing of culture. There was an 'America-town' in the city of Abadan.
But a military attack would change things. Despite the fact that ordinary Iranians have no animosity towards the US, if the US attacked, they'd fiercely defend their country no matter what.
By the way, we have to keep perspective here. The US is never going to attack Iran, and Iran is never going to attack Israel. This is all just routine saber-rattling for fun and benefit. The US and Iran pretty much agree that diplomacy is the most productive way forward. And it's entirely to be expected that Israel would try to incite a US attack on Iran, since they would lose nothing and gain everything. It would be the US that would lose lives and money. And Israel will _only_ attack Iran if it knows that America would follow it into the fray.