I need to pass a model value item.ID to one of my javascript function how can I do that ?

I tried`function("@item.ID")` but its not working
['https://Stackoverflow.com/questions/18849257', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1858684/']
Try this...mind single quotes on parameter value while calling js function

```
function MyJsFunction(modelvalue)
{
     alert("your model value: " + modelvalue);
}

<input type="button" onclick="MyJsFunction('@item.ID')" />
OR
<input type="button" onclick="MyJsFunction('@(item.ID)')" />

```
The best solution is pass your textbox ID to javascrpit function and then in function retrieve the value form the ID,

```
 @Html.TextBoxFor(model => model.DatemailedStart, new {id = "MailStartDate", placeholder = "MM/DD/YYYY", maxlength = "40", @class = "TextboxDates", @onblur = "isValidDate('MailStartDate');" })

  function isValidDate(id) {
    var dateString = $('#'+id+'').val();
  }

```