Invoking a function on Page_load event in MVC
问题 I am developing an MVC application. I want to call a javascript function on page load event of a page. Also I want to pass some string parameters to this function which i want to show as confirm message content. On confirm's OK click, i want to show an alert. How can i do this? Thanks, Kapil 回答1: If you're thinking about traditional ASP.NET server side Page_Load events then forget about it. Rather use something like jQuery and have a js function execute client side. You can pass in the params