开发者

use the message returned by $.ajax function

$.ajax({
    type: "post",
    url: "test.jsp",
    data: "user=" + name.val(),
    success: functio开发者_StackOverflow中文版n(msg) {

        $('#result').hide();

        $("#result").html(msg).fadeIn("slow");

        if (msg == "available") {
            //want to disaply image

alert('message: ' + msg); } } });

i want to display available and a image with a tick mark to indicate correctness,but the above code is not working alert is not working


//want to disaply image
$('#myImage').show();

If the image doesn't show up, you might want to add an alert

alert('message: ' + msg);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜