Field Type Via Client Script

Field Type Via Client Script

Hi there!

Does anyone know of a way to determine a field's type via a client script?

I'm looking to create a static script that I can call from a Page Event (onChange) on a Canvas Form Layout to validate a few fields.  If I could determine the field type, I could conditionally run code onChange.

Thoughts?