Original article: http://www.matiasmancini.com.ar/html5form_en.php
Below is a rough translation of key points:
In HTML5, verification input boxes can be implemented without JAVASCRIPT. Currently, only a few browsers are available.
This function is supported. Now, you can use the jquery plug-in to simulate this function. Installation:
<Head>
// JQuery library
<Script src = "http://code.jquery.com/jquery-1.4.2.min.js%22%3E%3C/script>
// JQuery.html 5 form plugin
<Script src = "http://html5form.googlecode.com/svn/trunk/jquery.html5form-min.js">
</Script>
<Script>
$ (Document). ready (function (){
Certificate ('{myform'}.html 5 form ();
});
</Script>
</Head>
HTML5 has the following features:
1) attribute placeholder
<Input type = "text" placeholder = "Full Name"/>
Placeholder is used when you do not enter anything in the text box,
The cursor automatically stays in the text box.
2) EMAIL
<Input type = "email" name = "email" id = "email"/>
3) TEXTAREA
<Textarea maxlength = "60" name = "comment" id = "comment"/>
4) URL
<Input type = "url" name = "website" placeholder = "http: // % 22/>
This indicates that the url must be entered.
Use this control
<Script>
Certificate ('{myform'}.html 5 form ({
Async: false, // cancels the default submit method.
Method: 'get', // changes the request method.
Action: 'recordsta. php', // changes the action method.
ResponseDiv: '# respuesta' // a content div to get the callback function response.
})
</Script>
5. When multiple forms exist
<Script>
Certificate ('{myform_one'}.html 5 form ({
Method: 'post ',
});
Certificate ('{myform_two'}.html 5 form ({
Method: 'get'
});
</Script>
Supports all browsers:
<Script>
Certificate ('{myform'}.html 5 form ({
AllBrowsers: true
});
</Script>
For download, see:
Http://html5form.googlecode.com/svn/trunk/jquery.html5form-min.js
Http://www.cnblogs.com/jackyrong/archive/2010/08/30/1812998.html