What is the best practice in select value from the input in Jquery? -


i want know answer on question. here example:

code:

<input type='text' name='input_name' id='input_id' value='something'> 

you can use .val()

$("input[type='text']").val() // css 3 kind selectors:: used loop through textboxes , perform operation   **or**  $("#input_id").val() 

if having class added input can use

$(".inputclass").val() 

id's can multiple , unique, note ids fastest selectors, , classes slower ids

you may see selectors.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -