JSFiddle - React, Tailwind, and code Playground
by Park Mino
HTML
<label for="content">내용 :</label>
<input id="content" name="content" value="" />
JavaScript
var placeholderText = '내용을 입력하세요';
var $content = $('input#content');
$content.val(placeholderText);
$content.on('focusin focusout', function (e) {
var value = this.value;
if (e.type == 'focusin' && value == placeholderText) {
this.value = '';
} else if (e.type == 'focusout' && value == '') {
this.value = placeholderText;
}
return false;
});