Check time difference in Javascript

How would you check time difference from two text-boxes in Javascript?