Text Field of HTML form

<input type="text" name="Name" value="default_value">
With form and submit button.
<form method='POST' action=target_page.php>
  <input type='text' name='topic' value='SEO basic'> 
  <input type='Submit' name='Name of the submit button' value='Submit'>
</form>
Text fields are data entry fields which takes small amount of data from the user ( textarea is used for large data ). This is one of the most widely used control of a WebForm.

HTML input textbox and its attributes like name value size maxlength autofocus with examples.

AttributeDescription
NameThis attribute specifies the name of the object through which it can be referenced.
ValueThis is used to specify the value of the text field.(optional)
SizeWidth of the text field.(optional)
MaxlengthUsed to specify the maximum number of characters that can be entered into the textbox.
Autocomplete New in HTML5Input element should have autocomplete .
autofocus New in HTML5Focus ( crusher inside ) the input text box by default .
DEMO of autofocus
placeholder New in HTML5Hint , help or about the input requirment can be given to user.
DEMO of Placeholder
readonlyData can't be changed by user
disabledDisabled from user
Keeping the cursor at textbox by default

Example:

<input type="text" name="txtbox" value="Simple Text">

This places a text field(single line text area) within the HTML form, which can be referenced by using its name "txtbox" and whose value is "Simple Text". Here is an example

How text box is managed by JQuery
TextArea to enter more text Hidden text field
Submit form to a new Window HTML and JavaScript Code for Back to Previous Page
HTML Form

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer