I have the following form using MVC :
@using (Html.BeginForm())
{
<div class="editor-label">
@Html.LabelFor(m => m.Title)
</div>
<div class="editor-field">
@Html.TextBoxFor(m => m.Title)
@Html.ValidationMessageFor(m => m.Title)
</div>
<div class="editor-label">
@Html.LabelFor(m => m.Description)
</div>
<div class="editor-field">
@Html.TextAreaFor(m => m.Description)
@Html.ValidationMessageFor(m => m.Description)
</div>
<div class="editor-label">
@Html.LabelFor(m => m.Icon)
</div>
<div class="editor-field">
@Html.RadioButtonFor(m => m.Icon, "http://maps.google.com/mapfiles/ms/icons/red-pushpin.png", new { @checked = "checked" }) <img src="http://maps.google.com/mapfiles/ms/icons/red-pushpin.png" alt="red pusphin" />
@Html.RadioButtonFor(model => model.Icon, "http://maps.google.com/mapfiles/ms/icons/red-pushpin.png") <img src="http://maps.google.com/mapfiles/ms/icons/blue-pushpin.png" alt="blue pushpin" />
</div>
}
How can I retrieve the data using javascript?
I tried the following but it does not seem to be working:
document.getElementsByName('Title').value;