1
我有一个默认值的文本字段。 Onclick应该清除,但只清除一次。 这是我正在使用的代码,但它完全覆盖了一切。应该如何让它点击一次,但之后它不会清楚?使onclick只出现一次
<div class="field clearfix wl_text_area">
<textarea id="element_4_comment" name="element_4_comment" cols="45" rows="10" class="validate[optional] wl_text_area" onclick="(this).value='' this.onclick=null;">Enter additional information here.</textarea>
</div>
http://stackoverflow.com/questions/3438557/how-to-disable-the-onclick-event-once-it-happens希望这会有所帮助。 – rach
'onclick =“this.value =''; this.onclick = null;' - 你忘了';' –
你缺少分号! – rach