! function (d, b, c, a) {
Velop.AssignmentQuestionAnswerHandler = function (e) {
this.__construct(e)
};
Velop.AssignmentQuestionAnswerHandler.prototype = {
__construct: function (e) {
this.clientAction = Velop.resolveClientAction("client", true);
this.sectionIdAction = XenForo.getAction("section");
this.$input = e;
this.assignmentQuestionControl = e.closest(".AssignmentQuestionAnswerHandler");
this.$input.change(d.context(this, "save"));
this.lastValue = null
},
...
我在js文件中看到了上面的腳本。在js文件中__construct的問題
問題:
這條線是什麼意思? __construct: function (e)
?這是否等於constructor: function (e)
?我在php文件中看到了__construct
,但我從未看到它用於js文件。
'__construct'有在Javascript中沒有特殊的含義,有人乾脆選擇了這個名字。 – deceze
JavaScript中沒有構造函數的概念。它只是一個使用下劃線的函數聲明。 – skparwal