Watermark for Textbox in MVC3

前端 未结 4 1212
不知归路
不知归路 2021-01-12 04:38

How do I set watermark for a texbox in MVC3 .Also if there are multiple textboxes in a web page, how do you write different watermark text for each textbox?



        
4条回答
  •  情深已故
    2021-01-12 05:30

    Using the MVC 3 standard, and an HTML5 compliant browser you can do:

    @Html.TextBoxFor(mdl => mdl.inputTextSearch, new { placeholder = "my watermark" })
    

提交回复
热议问题