You can use the attribute in HTML5 <input="text" placeholder="what you want to enter" > You can also use js to add css style Copy code The code is as follows:<style type="text/css"> .in_search { border:1 none; color:#999999; float:left; font-size:14px; height:18px; line-height:18px; margin:3px 2px; width:253px; } </style> <input name="q" class="in_search" onfocus="if(this.value=='Please enter what you want to enter'){this.value='';}" onblur="if(this.value==''){this.value='Please enter what you want to enter';}" type="text" value="Please enter what you want to enter"/> |
<<: JavaScript implements the detailed process of stack structure
>>: An example of vertical centering of sub-elements in div using Flex layout
From today on, I will regularly organize some smal...
Section Course content Hours 1 Web Design Overvie...
Implemented according to the online tutorial. zab...
This article example shares the specific code of ...
Table of contents 1. watch monitoring properties ...
How can you forget lazy loading of routes that al...
To achieve this effect, you must first know a pro...
1. Download the MySQL installation package First ...
1. Download and decompress 1. Introduction to Zoo...
01 Winter Flakes (Individual only) 02 Snowtop Cap...
1. Introduction A few days ago, I encountered a p...
Suppose a user management system where each perso...
This article shares the specific code for JavaScr...
Table of contents Vue recursive component drag ev...
This article shares the specific code of vue3 enc...