Wednesday 20 January 2021

jQuery - Functions that returns string or any other value.

 Watch this example on YouTube


 

@using (Html.BeginForm("Index", "Home"))
{
    
 
}

@section Scripts{
<script type="text/javascript">
    $(document).ready(function () {
       
        function ReturnSomething() {
            return 'Something';
        }
        var res = ReturnSomething();
        alert(res);
    });
</script>
}
 

 

No comments:

Post a Comment