jquery表单自动填充

分享一个jquery表单自动填充插件

How to use it?

you have a form

1
2
3
4
5
6
7
<form id="f">
name <input type="text" name="name">
email <input type="text" name="email">
love jQuery
<input type="radio" name="lovejquery" value="yes"> yes
<input type="radio" name="lovejquery" value="no"> no
</form>

and data

1
2
3
4
5
var data = {
"name": "John Doe",
"email": "johndoe@mail.com",
"lovejquery": "yes"
}

autofill the form with data

1
$("#f").autofill( data );

http://labs.creative-area.net/jquery.formautofill/doc/#examples