«prototype» etiketlenmiş sorular

6
JavaScript sınıf yöntemlerinde 'bu' tanımsızdır
JavaScript'te yeniyim. Bununla gerçekten yaptığım tek şey, mevcut kodda ince ayarlamalar yaptı ve küçük jQuery parçaları yazdı. Şimdi öznitelikler ve yöntemlerle bir "sınıf" yazmaya çalışıyorum, ancak yöntemlerle sorun yaşıyorum. Kodum: function Request(destination, stay_open) { this.state = "ready"; this.xhr = null; this.destination = destination; this.stay_open = stay_open; this.open = function(data) { …
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.