A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/elements/input/type/text below:

text · WebPlatform Docs

text Summary

The input element with a type attribute whose value is “text” represents a one-line plain text edit control for the input element’s value.

Overview Table
DOM Interface
HTMLInputElement
Examples

This example uses the INPUT type=text element to create an empty text control that can contain 15 characters without requiring the user to scroll to read all of the text.

<INPUT TYPE=text VALUE="" NAME="textbox" SIZE=15>

This example uses script to detect the content of the text box and display it in a dialog box.

<SCRIPT>
function detectEntry()
{
    alert("Your name is " + textbox.value)
}
</SCRIPT>
Notes Remarks

The SIZE attribute sets the number of visible characters in the INPUT type=text element. The MAXLENGTH attribute sets the maximum number of characters that can be entered. **Security Warning: **Using this object incorrectly can compromise the security of your application. When submitting text through INPUT type=text over an intranet or the Internet, validating the text string is recommended. For instance, you might validate the string for a restricted set of known, good values (such as letters and numbers) and ignore the rest. You should review the Security Considerations: Dynamic HTML before continuing. Note For more code samples, see Form controls part 1 and Form controls part 2: validation on the Windows Internet Explorer sample site.

Standards information HTML information

{

See also External resources

http://www.w3.org/TR/html-markup/input.text.html#input.text

Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4