JavaScript: FancyInput