Saturday, 21 September 2013

Autofocus Using HTML5



                                Autofocus Using HTML5 


WHEN MAKING A FORM, SOMETIMES YOU WANT TO THE TEXT CURSOR TO BLINK IN A PARTICULAR FIELD AT DEFAULT. HERE'S THE CODE TO ADD TO YOUR HTML FORM.

<input id="example1" name="example1" type="text" autofocus />
Placeholders Using HTML5 with the "Autofocus" tag.

Often when we are creating a form, even when that form is a single field, we want to let the user know the type of information they are expected to enter into the form. We don't, however, want them to have to manually delete that text from the form field before they can enter their own text. Previously we had to use JavaScript to do so, but now we can do it like this:

<input id="example2" name="example2" type="text" placeholder="suggestive text" /> 


by #adminBiigzee