How to set the default text in the text box ?
The effect is as shown in the figure:
Below is the source code.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>placeholder属性</title>
</head>
<body>
<input type="text" placeholder="点击搜索" />
</body>
</html>
single line text box
grammar:
<input type="text" />
placeholder attribute
Set the default text in the text box
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>placeholder属性</title>
</head>
<body>
<input type="text" placeholder="在这里设置默认文字" />
</body>
</html>