1
我有一個窗體有兩個文本框。我想要的是,當用戶點擊文本框時,默認值消失。我正在使用剃鬚刀,所以不知道如何添加我認爲需要的onfocus事件。有剃鬚刀文本框默認值消失
@using (Html.BeginForm("Index", "Home", FormMethod.Post, new { @class = "newsletterform" }))
{
@Html.TextBoxFor(m => m.Name, new { @Value = "Name"})
@Html.TextBoxFor(m => m.Email, new { @Value = "Email"})
<input type="submit" class="newsletterGo" value="Go" />
}
非常感謝 – Beginner