Posts by removed • 186 points
3 posts
-
1
votes2
answers261
viewsA: Set the value of the input whose name has brackets
There is a css selector for that reason: $('[name*="["]').val("novo valor"); Go find someone who contains anywhere in the attribute name a clasp [. w3schools example.…
-
2
votes3
answers1909
viewsA: Capture Input ID
A possible way without using function attr() is: $(":checkbox").each(function(){ alert( this.id ) }); Or if it’s just one element: alert( $(":checkbox")[0].id ) The Alert is illustrative.…
-
4
votes1
answer80
viewsA: Insert into with waiting time
You can disable input with javascript: function funcao (obj) { obj.disabled = true; // desabilita o input console.log("qualquer código dentro da função."); }; <input type="submit" value="Teste1"…