unobtrusive “default” text in input WITHOUT jQuery

前端 未结 7 1763
攒了一身酷
攒了一身酷 2021-01-16 22:15

i\'m trying to write unobtrusive default/placeholder text in input (actually, relatively placed label over input, which hides on onFocus

相关标签:
7条回答
  • 2021-01-16 22:57

    you will need to manually attach the onfocus and onblur events, having got a handle on the input with getElementById.

    here is an example: http://www.aspsnippets.com/Articles/Watermark-TextBox-using-JavaScript.aspx

    0 讨论(0)
提交回复
热议问题