title: How to add onload() event into @section('content') of laravel
body: <p>Is possible to do this? For example I have this code:</p>
  
  <pre><code>@section('content' onload='MyFunction')
    &lt;!--PAGE CONTENT...--&gt;
    &lt;div&gt;
     &lt;h1&gt;Something...&lt;/h1&gt;
     &lt;select name="sel"&gt;&lt;/select&gt;
    &lt;/div&gt;
  @endsection
  
  &lt;script type="text/javascript"&gt;
  
    function MyFunction(){
  
     obj = document.forms[0].sel;
  
     for (i=0; i&lt;23; i++) {
  
      //A similar condition to onload() event.
  
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>Or is it wrong of me to do that so? I'm working in Laravel and PHP. Or maybe using a Jquery function similar to the function in javascript. </p>