1
2つのテキストボックスを持つフォームがあります。私が望むのは、ユーザーがデフォルト値が消えるテキストボックスをクリックしたときです。私はかみそりを使用しているので、私が必要と考える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