なぜこの問題は表示されませんか?誰かが私を助けることができますか? 私はそれが非常に愚かな質問ですけど..しかし、私は実行するために...uncaught ReferenceError xxxが定義されていません
をそれを見ることはありません。
..私は聞いてすみませんready!
VM1507:1 Uncaught ReferenceError: User is not defined(…)
:var xxx = new User()
と私はいつもこれを取得
$(function() {
console.log("ready!");
function User() {
this.badgeVervalDatum = null;
this.bijNaam = null;
this.contactVia = null;
this.email = null;
this.familieNaam = null;
this.gsm = null;
this.id = null;
this.middleNaam = null;
this.postcode = null;
this.rkNummer = null;
this.sanBekw = null;
this.straat = null;
this.voorNaam = null;
this.volledigNaam = null;
this.woonplaats = null;
this.timeCreated = 0;
this.timeUpdate = 0;
this.timeLastLogin = 0;
}
User.prototype = {
constructor: User,
addEmail: function(email) {
this.email = email;
return true;
}
}
});
'User()'関数は* ready *ハンドラの中で定義されているので、そのコンテキストからのみ呼び出すことができます。それは世界的に利用可能ではありません。関数を*呼び出す*のはどこですか? – Pointy
'User'は、呼び出される無名関数の中でのみ定義されることに注意してください。' $(function(){function User(){....}});新しいユーザー()は動作しません –
yyess !!!!私はとても愚かです! –