Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

232
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda