I wanted to create a function that will return an array consisting values from 3 textboxes.
let's say: $('document').ready(function() { $('input#button_a').click(function() { a = $('input#input_text_a').val(); b = $('input#input_text_b').val(); c = $('input#input_text_c').val(); }); $('input#button_b').click(function() { a = $('input#input_text_a').val(); b = $('input#input_text_b').val(); c = $('input#input_text_c').val(); }); $('input#button_c').click(function() { a = $('input#input_text_a').val(); b = $('input#input_text_b').val(); c = $('input#input_text_c').val(); }); }); is there a way I can create the function within this jquery script? or is there a workaround? please teach me, I am new in this aspect. thank you in advance!