Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
El objeto no admite la propiedad o el método 'indexOf'

Estoy usando el siguiente código:

 <html> <head> <title></title> <script src="jquery-3.2.0.js"></script> </head> <body> <script type="text/javascript"> $(window).load(function () { alert('Window loaded'); }); $(document).ready(function () { alert('DOM Loaded and ready'); }); </script> </body> </html>

Es tan simple, pero recibo el error.

 "Object doesn't support property or method 'indexOf'".

Estoy usando Internet Explorer

¿Cuál es la razón de ello?

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

La función de load quedó obsoleta en 1.8 y se eliminó en 3.0. Usa el método on su lugar

 <html> <head> <title></title> <script src="https://code.jquery.com/jquery-3.2.0.min.js"></script> </head> <body> <script> $(window).on("load",function () { alert('Window loaded'); }); </script> </body> </html>

De https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/

Se eliminaron los alias de eventos obsoletos

.load, .unload y .error, en desuso desde jQuery 1.8, ya no existen. Use .on() para registrar oyentes.

about 4 years ago · Santiago Trujillo Report

0

 $(window).load(function () { alert('Window loaded'); }); $(document).ready(function () { alert('DOM Loaded and ready'); });
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!