我有一个表格,要求输入名字/姓氏、电子邮件和电话。我不想使用“占位符”,因为 IE 缺乏这种能力。我已经尝试了很多事情,但对脚本编码知之甚少,当有人提交他们的信息时,我如何将默认文本从字段中剥离出来。
我需要找到一种方法,让下面的代码只向我发送输入字段的数据,而不是像“电话”这样的表单中的 txt
<form action="{SUBMIT_FORM}" method="post">
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = '*First Name : (Required Field)';}" onfocus="if (this.value == '*First Name : (Required Field)') {this.value = '';}" name="{lead_first_name}" id="{lead_first_name}" value="*First Name : (Required Field)"/>
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = 'Last Name :';}" onfocus="if (this.value == 'Last Name :') {this.value = '';}" name="{lead_last_name}" id="{lead_last_name}" value="Last Name :"/>
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = '*Email : (Required Field)';}" onfocus="if (this.value == '*Email : (Required Field)') {this.value = '';}" name="{lead_email}" id="{lead_email}" value="*Email : (Required Field)"/>
<input type="text" class="input-field" onblur="if (this.value == '') {this.value = 'Phone :';}" onfocus="if (this.value == 'Phone :') {this.value = '';}" name="{lead_home_phone}" id="{lead_home_phone}" value="Phone :"/>
<input type="submit" class="sbt-btn" value="Submit" onclick="{SUBMIT_SCRIPT}" />
{VALIDATE_SCRIPT}
</form>
<small>*We promise to never share, rent or sale your personal information.</small>