I have been using JQUERY to superimpose two INPUT boxes to realize the user name and password that need to be entered during login to realize prompts and user output. Here I use JQUERY to achieve this effect in an INPUT box. The specific method is:
//Set the default value of search $(".search_text").focus(function(){ if($(".search_text").val()=='search'){ $(".search_text").val(""); } else{ $(".search_text").val($(".search_text").val()); } }); $(".search_text").blur(function(){ if($(".search_text").val()==''){ $(".search_text").val("search"); }else{ < ;span style="white-space:pre"> $(".search_text").val($(".search_text").val()); } });
I won’t adjust the format. After all, it’s not an IDE editor used in programming. If you are interested, you can take a look!
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