jQuery querying the database
The thing is that there are number of items i开发者_StackOverflown the HTML select list. I want to click on any of the items, then query the database on the id of that item, retrieve the value and then display that in the textbox. How would I query the database?
I would really appreciate that if someone provides a code sample for querying the database.
Have jquery fire an ajax call to your server. Your server is what will actually query the database.
Something like
$.get('/ajaxquery/yourselectvalue', function(data) {
$('#yourTextBox').val(data);
});
精彩评论