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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -