"Clear input placeholder on focus / Fill on blur"
Bootstrap 4.1.1 Snippet by blackgirl

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <form name="form" method="post"> <div class="row form-group"> <input class="col-md-3" type="text" name="name" onfocus="if(this.value=='имя'){this.value = '';}" onblur="if(this.value==''){this.value='имя';}" value="имя"/> <input class="col-md-3" type="text" name="phone" onfocus="if(this.value=='телефон'){this.value='';}" onblur="if(this.value==''){this.value='телефон';}" value="телефон"/> <input class="col-md-3" type="text" name="email" onfocus="if(this.value=='e-mail'){this.value='';}" onblur="if(this.value==''){this.value='e-mail';}" value="e-mail"> <button class="col-md-3 btn btn-success" type="submit">Отправить</button> </div> </form>
form { padding: 30px; } input { padding: 10px; }

Related: See More


Questions / Comments: