2012-07-05 68 views

回答

1
@Html.TextBox("Place textbox name here", "Place default value here") 
@Html.TextBoxFor(Model field declaration here, new { Value = "Place default value here" } 

如果你想使用输入掩码,那么你可能需要看看这里jquery input mask

3

你可以使用HTML5占位符。适用于Chrome和Firefox。 U可以使用modernizr使其在IE和其他旧浏览器中工作。

How to set up modernizr for placeholder

@Html.TextBoxFor(model => model.Name,new { placeholder = "Fill in your name" }) 
相关问题