How to run a JQuery function on page load MVC asp.net -
i have jquery function fetchfunctions()
need run when page loaded. not sure how within mvc using template. don't have section on page. adding _layout page doesn't make sense.
inside of page add script tag
somepage.cshtml
<script> window.onload = function(){ //script goes here }; //or if prefer jquery $(function(){ //script goes here }); </script>
Comments
Post a Comment