Home >Web Front-end >JS Tutorial >ASP.NET jQuery Example 1 (Create a default prompt in TextBox)_jquery

ASP.NET jQuery Example 1 (Create a default prompt in TextBox)_jquery

WBOY
WBOYOriginal
2016-05-16 17:57:18938browse

When the text box gets focus, if the content of the text box is the same as the prompt content, the prompt content will disappear naturally.
When the text box has no value and loses focus, the text box content will regenerate the default prompt.
In order to achieve the above requirements, the code is as follows:

Copy the code The code is as follows:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Recipe1.aspx.cs" Inherits="Recipe1" %>



Recipe1


















Display effect:

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn