0
var P = P || {}; // create global container object if it does not exist
P.file = {
name : null,
type : null,
size : null,
data : null
};
當我在Eclipse中鍵入P.
時,我沒有將P.file
作爲自動完成建議。這種在JavaScript中創建對象的風格有什麼不對嗎?或者至少在Eclipse中完成代碼錯誤?Eclipse Juno中的JavaScript代碼完成不工作
更多信息:這是一個啓用了JavaScript支持的Java EE項目。對於全球功能,如function doSomething() { ... }
代碼完成工作時,我鍵入doSo
並擊中Ctrl +空間。
它不適用於跨文件的對象。它可以用於原型。 – zeroflagL 2013-03-23 14:59:45