Posted By

kcmr on 09/29/08


Tagged

javascript debug firebug


Versions (?)

Avoid javascript errors in IE using console.log


 / Published in: JavaScript
 

  1. function debug(what){
  2. if(window.console && window.console.firebug){
  3. console.log(what);
  4. }
  5. else{
  6. alert(what);
  7. }
  8. }
  9.  
  10.  
  11.  
  12. function prueba(){
  13. var algo = document.getElementById('test');
  14. debug(algo);
  15. }

Report this snippet  

You need to login to post a comment.