HTML5-Formulare mit jQuery.html5form
Mit dem von Matias Mancini machen Sie aus Ihrem Browser einen HTML5-Kompatiblen Bowser. Mit Einschränkungen aber ...
2010-09-23 10:12:45 2010-09-23 10:12:45 admin
Mit HTML5 lassen sich schöne, aber vor allem praktikable Formulare bauen. Leider nur, dass viele Browser mit HTML5 noch nicht umgehen können.

Matias Mancini hat sich mit seinem jQuery-Plugin aufgemacht, diesen Missstand ein wenig zu mindern. Mit nur einer Zeile Code im Header stehen Ihnen jetzt Platzhaltern, Maxlength, Autocomplete und den Input-Feldern Url und E-Mail zur Verfügung. Leider werden die Input-Felder Date und Number noch nicht unterstützt.
Aktuell werden folgende Browser unterstützt.- Internet Explorer: IE6 - IE7 - IE8 - IE9 beta
- Mozilla Firefox: 3.0 - 3.5 - 3.6 - 4.0 beta4
- Google Chrome: 4.0 - 5.0 - 6.0
- Apple Safari: 4.0 - 5.0
so einfach gehts
Im ersten Schritt werden die notwendigen jQuery und jQuery.html5form im header eingebunden
<head>
//jQuery library
<script src='http://code.jquery.com/jquery-1.4.2.min.js'></script>
//jQuery.html5form plugin
<script src='http://html5form.googlecode.com/svn/trunk/jquery.html5form-min.js'>
</script>
<script>
$(document).ready(function(){
$('#myform').html5form();
});
</script>
</head>
Dann einfach nur ein HTML5 Formular aufbauen und fertig. Es werden keine Classen benötigt. Die notwendigen Informationen erhält jQuery.html5form über die Attribute.
<input type='email' name='email' id='email'/>
Den Rest übernimmt jetzt jQuery.html5form. In diesem Beispiel wird auf Korrektheit der Emailadresse automatisch geprüft.
Auf die selbe einfache Art und Weise können Required -Elemente erstellt werden.
<input type='text' name='lastname' required />
Unter http://www.matiasmancini.com.ar/html5form_en.php findet Ihr weitere Beispiele
Ratings
Here you can write a comment
Related topics
Definition of stored procedures - an introduction
Stored procedures are predefined SQL code blocks that are stored in a database and can be called up as required. ...
Autor :
ebiz-consult GmbH & Co. KG
Category:
mySQL-Tutorials
Werte aus Flash an PHP und JavaScript, und umgekehrt senden
Dieses Tutorial soll euch zeigen, auf welche Weise ihr Werte aus Flash an PHP und JavaScript, und umgekehrt senden könnt. ...
Autor :
Borlabs
Category:
Other tutorials
MySQL Klasse
In meinem kleinen Tutorial zeige ich euch, wie ihr ganz einfach eine kleine MySQL Klasse schreiben könnt. ...
Autor :
Borlabs
Category:
mySQL-Tutorials
PHP cURL Tutorial: Using cURL to Make HTTP Requests
cURL is a powerful PHP extension that allows you to communicate with different servers using various protocols, including HTTP, HTTPS, FTP, and more. ...
Autor :
TheMax
Category:
PHP-Tutorials
Fortschrittsbalkens mit PHP
ProgressClass stellt eine PHP-Klasse für die dynamische Anzeige und Veränderung eines Fortschrittsbalkens zur Verfügung. ...
Autor :
what@
Category:
PHP-Tutorials
What do I need to set in WordPress to Stop loading Google Fonts?
Want to stop WordPress from using Google Fonts? Here you can learn what you need to set in WordPress. ...
Autor :
admin
Category:
Other tutorials

