- JQuery_[JQuery 를 이용한 객체 확장]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <script src="http://code.jquery.com/jquery-1.7.min.js"></script>
    <script>
        $.noConflict();
        var J = jQuery;
        J(function () {
            var object = {};
            object.name = "RintIanTta";
            object.gender = "Male";
            object.part = "Second Guitar";

            J.extend(object, {
                age: "28"
            });

            var outPut = "";
            J.each(object, function (key, item) {
                outPut += key + ": " + item + "\n";
            });
            alert(outPut);
        });
    </script>
    <title>Untitled Page</title>
</head>
<body>

</body>
</html>

+ Recent posts