Plugin jQuery: jQuery Autofill City & State from Zip Code with Ziptastic

jQuery Autofill City & State from Zip Code with Ziptastic
http://www.jqueryrain.com/?http://css-tricks.com/examples/Zip/
http://css-tricks.com/using-ziptastic/
x, , Forms, , jSON, , Other API
07/05/2012

Nội dung

jQuery Autofill City & State from Zip Code with Ziptastic

Most address fields on web forms ask for city, state, and zip code (or city and post code, outside of the US). But as us nerds often lament, city and state are redundant with zip code. Or at least they can be inferred from a correctly entered zip code. That’s the kind of thing computers are good at. What we need is a proper API to cough up that information for us on demand

We’re going to watch the zip input for keystrokes. Should the final value after a keystroke be a valid zipcode, we’ll attempt to get the city and state through Ziptastic and reveal the other fields.


Nguồn: www.jqueryrain.com/2012/05/jquery-autofill-city-state-from-zip-code-with-ziptastic/


Chưa có phản hồi
Bạn vui lòng Đăng nhập để bình luận