开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜