简体   繁体   中英

How to call javascript function on the page load event of the child page which is in contentplaceholder?

I've asp.net web site , i used master page for the design. I've many child pages which are placed in the contentplaceholder. I want to call the javascript function on the page load event of the child page. And there are different javascript functions on each child page.

thanks

try creating a

<script>
  (function yourFunc() {
  ....your code ....
  })();
</script>

in the child page and there you can use the function

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM