我想知道如果任何人都可以給我解釋一下下面這段JavaScript代碼:闡釋對Javascript代碼需要
j1 = {};
j1.version = "0.0.1";
j1.port = "0";
j1.key = "DEFAULT_KEY"; //default random key
j1.requestID = 1000;
j1.setPort = function (port) {
this.port = port;
};
j1.setKey = function (key) {
this.key = key;
};
j1.onDeviceReady = function() {};
j1.onPushNotification = function (message) {};
j1.platform = {};
j1.platform.WINDOWS_PHONE = "WINDOWS_PHONE";
j1.platform.IOS = "IOS";
j1.platform.BLACKBERRY = "BLACKBERRY";
j1.platform.ANDROID = "ANDROID";
// Device
j1.device = {
name: "",
version: "",
platform: "",
uuid: "",
initDevice: function (deviceName, deviceVersion, devicePlatform, deviceUUID) {
this.name = deviceName;
this.version = deviceVersion;
this.platform = devicePlatform;
this.uuid = deviceUUID;
}
};
這是一個混合移動Web應用程序的條款。
由於
斯納
你有什麼不明白的? – Bergi 2012-03-30 07:27:12