/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/*DOM Scripting*/ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } function mostrarVentana(){ alert('Hola mundo sin jQuery'); } addLoadEvent(mostrarVentana); /*jQuery*/ $(document).ready(function(){ alert('Hola mundo con jQuery'); });
Comments
