I got a bit of a pickle.
What im trying to do is click on a link and it automatically puts a value into an input field.
I have an quicksearch table that auto sorts when you type something in the search box. I want to be able to click a link with a specific name that automatically puts t开发者_如何学JAVAhat value in the search field.
So far i have this
$(document).ready(function() {
$('#test').click(function() {
$('.qs_input').val( $(this).text() ).keyup();
return false;
});
});
Cheers,
This should do it:
$('#yourLink').click(function() {
$('#yourInput').val( $(this).text() ).keyup();
return false;
});
精彩评论