html - i don't know how to get the text -


i want values in text box , show in table please help! cant figure out how tried looking @ samples not understand how use , incorporate code

you can value input .val() function. example:

var product = $('#exampleinputproduct1').val(); 

so use when building table row. example:

$("#addproduct").click(function(){     var html = '<tr>';     html += '<td>' + $('#exampleinputproduct1').val() + '</td>';     html += '<td>' + $('#exampleinputdesc1').val() + '</td>';     html += '<td>' + $('#exampleinputqty1').val() + '</td>';     html += '<td>' + $('#exampleinputprice1').val() + '</td>';     html += '</tr>';      $('#listproduct tr').last().after(html); }); 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

How to merge four videos on one screen with ffmpeg -

c - getting error: cannot take the address of an rvalue of type 'int' -