开发者

jQuery querying the database

开发者 https://www.devze.com 2022-12-30 13:43 出处:网络
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 the

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);
});
0

精彩评论

暂无评论...
验证码 换一张
取 消