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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -