how to get the value from a textbox that is next to my text
问题 i have an html page where i have a table of items (one item per row) where each item is a html link that says "Add" and there is a textbox next to each link with a number in it. the text link and the textbox are in the same td inside the row of the table. how do i, using jquery, capture the value from the textbox that is to the right of the link i click on. 回答1: You could give your link a class, then do this: $("a.myClass").click(function() { alert($(this).next().val()); }); If you have a lot