jQuery.dForm 1.0.1 example
This is a simple example for jQuery.dForm
by Daff
HTML
<script src="http://daffl.github.io/jquery.dform/release/jquery.dform-1.1.0.js"></script>
<form id="myform"></form>
CSS
body {
font-family: sans-serif;
padding: 10px;
}
label, input {
display: block;
margin-top: 10px;
}
JavaScript
$("#myform").dform({
"action" : "index.html",
"method" : "get",
"html" :
[
{
"type" : "p",
"html" : "You must login"
},
{
"name" : "username",
"id" : "txt-username",
"caption" : "Username",
"type" : "text",
"placeholder" : "E.g. [email protected]"
},
{
"name" : "password",
"caption" : "Password",
"type" : "password"
},
{
"type" : "submit",
"value" : "Login"
}
]
});