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/']
You can pass the model data into the java script file in these ways
(1). Just set the value in hidden field and access the value of hidden field in java script.
(2). And pass the value using function parameter.
(3). 

```
        var LoginResourceKeyCollection = {
            UserName_Required: '<%= Model.UserName%>',
            Password_Required: '<%= Model.Password%>'

        }
   </script>

```
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)')" />

```