-1

我有这段代码来加载一个 gif,但我不明白这$(".block1").load("views/changepass.template.php");部分。请解释。

$(function() {
    $(".changepass").click(function() {
        $(".block1").load("views/changepass.template.php");
        return false;
    });
});
4

1 回答 1

0

这是脚本的注释版本,它应该解释一切:

$(function() {//When the document is ready to be interacted with, ...
    $(".changepass").click(function() {//establish a 'click' event handler for .changepass element(s), which ...
        $(".block1").load("views/changepass.template.php");//loads content from the server into .block1 element(s), then ...
        return false;//ensures the natural 'click' action of the clicked element is not executed.
    });
});
于 2013-04-03T20:40:26.320 回答