jquery выпадающий список с поиском



Автор Sadfsadf asdfasdfas задал вопрос в разделе jQuery

ajax jquery как сделать чтоб при клике на выпадающий список происходило действие и получил лучший ответ

Ответ от Илья Ш[гуру]
$(document).ready(function(){
$("button").click(function(){
var send = $(this).val();
$.post("demo_test_post.php",
{
val: send,
},
function(data,status){
alert("Data: " + data + "
Status: " + status);
});
});
Илья Ш
(13681)
jQuery $.post() Method
The $.post() method requests data from the server using an HTTP POST request.
Syntax:
$.post(URL,data,callback);
The required URL parameter specifies the URL you wish to request.
The optional data parameter specifies some data to send along with the request.
The optional callback parameter is the name of a function to be executed if the request succeeds.
The first parameter of $.post() is the URL we wish to request ("demo_test_post.asp").
Then we pass in some data to send along with the request (name and city).
The ASP script in "demo_test_post.asp" reads the parameters, processes them, and returns a result.
The third parameter is a callback function. The first callback parameter holds the content of the page requested, and the second callback parameter h

Ответ от Imobilazer[гуру]
Например так:
$('#spisok').change(function() {
var sel = $(this).val();
$.ajax({
type: "POST",
url: "query.php",
datatype: 'json',
data:
{
data_type : sel
},
success: function(data)
{
alert(data)
}
});
});

Ответ от 22 ответа[гуру]
Привет! Вот подборка тем с похожими вопросами и ответами на Ваш вопрос: ajax jquery как сделать чтоб при клике на выпадающий список происходило действие
 

Ответить на вопрос:

Имя*

E-mail:*

Текст ответа:*
Проверочный код(введите 22):*