使用jQuery

时间:2016-05-05 09:58:10

标签: javascript jquery html css input

我正在创建一个输入字段,我想为访问者提供如何继续操作的说明。单击后,指令将自动隐藏。我能做到,但我发现长句没有正确显示。我尝试用css包装代码,但没有运气。

以下是代码:

.replybox{}
.reply-control{
border:1px solid #ccc;
background: transparent;
font-size:20px;
width:100%;
height:100px;
color:#8d8d8d;}
<input class="reply-control" name="replybox" onblur="if (this.value == &quot;&quot;) {this.value = &quot;How to wrap this text? It is hiding the overflown text. I am not finding any way. Please help&quot;;}" onfocus="if (this.value == &quot;How to wrap this text? It is hiding the overflown text. I am not finding any way. Please help&quot;) {this.value = &quot;&quot;;}" value="How to wrap this text? It is hiding the overflown text. I am not finding any way. Please help" type="text"/>

JSFiddle here

1 个答案:

答案 0 :(得分:1)

<textarea type="text" placeholder="Update details of your present skin condition (e.g. normal, dry, flaky, etc). Optionally, add details of any past skin conditions, medication or skin treatments/surgeries undergone. You may also upload images/reports, so that doctors understand your condition better." value=""></textarea>