utilities.js
来自「国外很不错的一个开源OA系统Group-Office」· JavaScript 代码 · 共 76 行 · 第 1/5 页
JS
76 行
catch(e){}obj.tId=o.tId;obj.status=o.conn.status;obj.statusText=o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}return obj;},createExceptionObject:function(tId,callbackArg,isAbort){var COMM_CODE=0;var COMM_ERROR='communication failure';var ABORT_CODE=-1;var ABORT_ERROR='transaction aborted';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}if(callbackArg){obj.argument=callbackArg;}return obj;},initHeader:function(label,value){if(this._http_header[label]===undefined){this._http_header[label]=value;}else{this._http_header[label]=value+","+this._http_header[label];}this._has_http_headers=true;},setHeader:function(o){for(var prop in this._http_header){if(this._http_header.hasOwnProperty(prop)){o.conn.setRequestHeader(prop,this._http_header[prop]);}}delete this._http_header;this._http_header={};this._has_http_headers=false;},setForm:function(formId,isUpload,secureUri){this.resetFormState();var oForm;if(typeof formId=='string'){oForm=(document.getElementById(formId)||document.forms[formId]);}else if(typeof formId=='object'){oForm=formId;}else{return;}if(isUpload){this.createFrame(secureUri?secureUri:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=oForm;return;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?