I've tried to find answers on internet to this.. but I didn't find :(
I'm trying to call automatically a javascript function passing parameters inside a < div > element when the page is loaded.
I know that "onload" doesn't work on < div > elements. I don't have idea how to do that.
Note..: My parameters are dynamics because it's inside a foreach loop. Each loop I have 2 different parameters to send to the function.
@foreach(var i in Something)
{
<div onload="myFunction(i.param1, i.param2);">
</div>
}
<body onload="">?