Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

246
Vistas
Object doesn't support property or method 'indexOf'

I am using the below code:

<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>

Its so simple, yet I am getting the error

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

I am using Internet Explorer

What is the reason for it?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

The load function has been deprecated in 1.8 and removed in 3.0. Use the on method instead

<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>

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

Removed deprecated event aliases

.load, .unload, and .error, deprecated since jQuery 1.8, are no more. Use .on() to register listeners.

over 4 years ago · Santiago Trujillo Denunciar

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>


     

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda