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

StackOverflow https://stackoverflow.com/questions/8352978

Question

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

Was it helpful?

Solution

try creating a

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

in the child page and there you can use the function

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top