Js объекты

function Form(email, keyOfList) {
        this.userKey = "763a5b0bc65511e6e3217475d";
        this.urlOfForm = "//integrus.us12.list-manage.com/subscribe/post";
        if (keyOfList === undefined) {
            this.keyOfList = "6c1fd9c23c";
        } else {
            this.keyOfList = keyOfList;
        }

        this.email = email;

        this.setEmail = function (email) {
            this.email = email;
        };

        this.getUrl = function () {
            return (this.urlOfForm + "?u=" + this.userKey + "&id=" + this.keyOfList);
        };

        this.getEmail = function () {
            return  this.email;
        };

        this.getData = function () {
            var data = new Object();
            var hiddenKey = "b_" + this.userKey + "_" + this.keyOfList;

            data[hiddenKey] = "";
            data['EMAIL'] = this.email;
            data['subscribe'] = 'Subscribe';
            return  data;
        };

    }

 

 

 Еще статья 

Leave a Reply

Your email address will not be published. Required fields are marked *

Этот сайт использует Akismet для борьбы со спамом. Узнайте как обрабатываются ваши данные комментариев.