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
Post a Comment