好吧,我想知道是否有可能將對象的引用傳遞給函數。如果你不明白我嘗試說,這可能幫助: //so i declare the variable `Editor`
var Editor = new (function(e, d){
this.edit = e;
this.dyna = d;
this.old = ""; //and set these variables
有時JavaScript對我沒有意義,請考慮下面的代碼,該代碼根據x/y圖塊生成照片拼圖。我試圖將一個.Done屬性設置爲true,一旦每個Mosaic圖像下載完成,但由於某種原因它總是假的,我做錯了什麼? var tileData = [];
function generate()
{
var image = new Image();
image.onload = fu
我的JS var Customer : function()
{
this.ShipProduct : function()
{
//Logic for shipping product. If shipping successful, notify user
//Here I am trying to call Notify
//this