I happened to encounter this problem during development, because jQuery always only returns the value of the first class tag, so it cannot meet our requirements.
For example:
To get the values of all html elements of a set of class tags. You have to use jQuery's each traversal.
jQuery('.btn').each(function(key,value){
btns[key] = $(this).val();
//Or you can also write:
// btns[key] = $(value).val();
});