English 中文(简体)
如何使用jquery ajax成功数据
原标题:how to use jquery ajax success data
  • 时间:2011-07-05 09:42:05
  •  标签:
  • ajax

我经常遇到一个问题,即我无法利用亚克斯成功数据来履行另一项职能。 (单位:千美元)

$("#addproperty_state").keyup(function(){
    var vardata = $(this).val();
    var urlPro ="<?php echo HTTP_PHP; ?>ajax_common.php?action=get_area&area="+vardata;
    $.ajax({
        type: "POST",
        url: urlPro,
        dataType: "text",
            async:false,
        success: function(data) {
            $( #statelist ).html(data);
            }
    });
    return false; 
});

我现在要利用亚克斯呼吁的结果,以便我能够把另一个具有结果价值的文字箱放在一起。

$("#statelist li").click(function(){
    var statename = $(this).attr("title");
    $("#addproperty_state").val(statename);
});

but if i was now to click on the li nothing happens. How can i use the ajax result to actually do something else with it? Any assistance would be greatly appreciated. Thank you

问题回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签