The Hottest Porn Videos Online mecum.porn Quality porns videos Free indian porn tube videos indiansexmovies.mobi hot indian women watch online

Tag: JavaScript

12 Posts

Ajax Packaged
try to pakage ajax by myself optional paramas: method: get(default) post url data: Allow Type: Object, FormData dataType: Object(default) , auto translate to urldecode json file async: true(default) false showProgress: if dataType is "file" and this is a function, it will be called instantly success: callback function while request successfully param: server responseText fail: callback funciton while request failed main function function ajax(options){ var opt = { method: "GET", async: true, } //if browser dosen't support Object.assign() you can define by yourself Object.assign(opt,options) if(!opt.url) return var XMLHttp = null if(XMLHttpRequest){ XMLHttp = new XMLHttpRequest() }else{ XMLHttp = new ActiveXObject("Microsoft.XMLHTTP") } //method: post if(!!opt.method && opt.method.toUpperCase() == "POST"){ XMLHttp.open("POST",opt.url,opt.async) //dataType: json if(!!opt.dataType && opt.dataType.toUpperCase() == "JSON"){ opt.postData = JSON.stringify(opt.data) XMLHttp.setRequestHeader("Content-Type","application/json") XMLHttp.send(opt.postData) } //dataType: file else if(!!opt.dataType && opt.dataType.toUpperCase() == "FILE"){ XMLHttp.send(opt.data) } //dataType: Object else{ var param = [] for(var key in opt.data){ if(opt.data.hasOwnProperty(key)){ param.push(key+"="+opt.data[key]) } } opt.postData = param.join('&') var urlparams = opt.url.slice(opt.url.indexOf('?')+1) if(urlparams.indexOf('?') == -1){ opt.postData.concat('&'+urlparams) } XMLHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8') XMLHttp.send(opt.postData) } } //method: get else if(opt.method.toUpperCase() === "GET"){ var params = [] if(!!opt.data){ for(var…
JavaScript Data Structure Notes
Javascript Data Structure Notes review: true,false value in javascript variable type transform to boolean undefined false null false boolean true:true,false:false number +0/-0/NaN:false String is blank:false,else:true Object true for example: (new Boolean(false))?'true':'false' result:'true' tips:Object always is true core functions of Array Name Description concat concatenate two or more arrays and return every implement function that given for every items util it is end or there is a return value is false and if all results are true,return true,else return false some difference from every() is that only if one result is true will return true filter implement function that given for every items and return array consists of items which return true forEach implement function that given for every items and no return value (parameter:value,key,index) join concatenate all items in array into single string indexOf return the index of item in array that is up to the parameter given,no item matched return -1 lastIndexOf similar to indexOf() but return the max index matched map implement function that given for every items and all results will constitute…