How can I make this?

I'm trying to run an onChange script for multiple fields.