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

225
Vistas
Javascript jquery AutoComplate İnput no funciona

Javascript jquery AutoComplate İnput no funciona. Puedo intentarlo, pero no esto. Agregue el enlace del paquete pero la entrada de Autocompletar no funciona. Solo quiero agregar el paquete después de que funcione la entrada de autocompletar. Solo esto... Creo que insertCell Hard esto. No lo entiendo. id = 'dap'

 $(function() { var availableTags = [ "arta", "barta", "barta2", ]; $("#dap").autocomplete({ source: availableTags }); });
 <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" /> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <title></title> </head> <body> <form method="post" action="add.php"> <table id="table1"> <tr> <br> <td colspan="4"><a onclick="myFunction1()" style=" color: #000; margin-top: 10px"><i></i> Paket Ekle</a>&nbsp;&nbsp; <a onclick="myDeleteFunction1()" style="color: #000; margin-top: 10px"><i ></i> Paket Sil</a></td> </tr> <tr> <td valign="bottom"><strong>GTIP No.</strong></td> </tr> <tr> <td><input name="dap" type="text" style="width:90%; margin-top: 15px"></td> <script> var i = 1; function myFunction1() { var table = document.getElementById("table1"); var row = table.insertRow(-1); var cell1 = row.insertCell(0); cell1.innerHTML = "<input name='dap" + i + "' id='dap' type='text' style='width:90%;margin-top:15px;' >"; i++; } function myDeleteFunction1() { document.getElementById("table1").deleteRow(-1); } </script> </table> </form> </body> </html>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Puede usar on para vincular el evento en el elemento agregado dinámicamente

 $(function() { var availableTags = [ "arta", "barta", "barta2", ]; $(document).on('keydown.autocomplete', '#dap', function() { $(this).autocomplete({ source: availableTags }); }); });
 <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" /> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <title></title> </head> <body> <form method="post" action="add.php"> <table id="table1"> <tr> <br> <td colspan="4"><a onclick="myFunction1()" style=" color: #000; margin-top: 10px"><i></i> Paket Ekle</a>&nbsp;&nbsp; <a onclick="myDeleteFunction1()" style="color: #000; margin-top: 10px"><i ></i> Paket Sil</a></td> </tr> <tr> <td valign="bottom"><strong>GTIP No.</strong></td> </tr> <tr> <td><input name="dap" type="text" style="width:90%; margin-top: 15px"></td> <script> var i = 1; function myFunction1() { var table = document.getElementById("table1"); var row = table.insertRow(-1); var cell1 = row.insertCell(0); cell1.innerHTML = "<input name='dap" + i + "' id='dap' type='text' style='width:90%;margin-top:15px;' >"; i++; } function myDeleteFunction1() { document.getElementById("table1").deleteRow(-1); } </script> </table> </form> </body> </html>

about 4 years ago · Juan Pablo Isaza 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