When I click on the page, “Search ...” is displayed in the text box, in gray font.
Then I click on the text box. Then the "search ..." disappears. And I can print.
What you are looking for is called the watermark effect. You can find the relevant jQuery plugins here .
This is usually called "default text" and yes, there is a plugin.
JQuery default text plugin
, . , , , , "", . , , , .
: http://tholljos.lu/mike/files/watermark.zip
jQuery(selector).watermark('here be text...','cssClass');
'here be text' . 'cssClass' - css, , .
AFAIAC , . , , , .
$("textinput_id").focus(function(){ $(this).text(""); }); $("textinput_id").blur(function(){ $(this).text("Search..."); });
Source: https://habr.com/ru/post/1780161/More articles:How to format tall graphics? - jqueryЗадание значения по умолчанию для поля скрытой формы django - кость DRY? - djangohow to create a service in python on windows? - pythonAliasToBeanResultTransformer and Hibernate SQLQuery - javaКак проверить правильность выбора флажка, если все флажки имеют одинаковое имя? - javascriptHelp stream video from IP camera in Android - androidJQuery Shimmer Button Effect - jqueryhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1780164/looking-for-best-practices-to-test-stored-procedures&usg=ALkJrhiHYgcKRs-A8BzYzNTU1v729kN29AМожно ли использовать язык X ++ для следующей разработки? - x++how to create html table in php - htmlAll Articles