Category:JavaScript

  • The essence of Ajax uploading images

    Time:2020-9-21

    Upload the image to the server. 2. The background will send the image address to the HTML page and display it in the form of pictures. 3. Add the image address to the input form the day after tomorrow, and the form is hidden. 4. Delete the image at the front end and remove the […]

  • 1. Classification and judgment of data type

    Time:2020-9-20

    classification Basic type String: any string Number: any number, three special values:Infinity, -Infinity, NaN. Boolean: true/false Undefined: undefined, variable declaration is not assigned, is reserved as a default initial value for unassigned things. Null: null means “nothing”, “empty”, “value unknown” Object (Reference) type Object: any object Function: a special object (executable) Array: a special object […]

  • Wechat small program WXS to achieve ceiling effect

    Time:2020-9-20

    In the. JS file, when the onpagescroll event of page and the scroll event of scroll view are used, the execution of other scripts will be blocked by SetData rendering, resulting in the delay of the animation process of the whole user interaction. Therefore, WXS response event is used to achieve the topping effect. WXS […]

  • Front end interview question arrangement — JavaScript Foundation

    Time:2020-9-19

    Common value types: let a; //undefined let s = ‘abc’; let n = 100; let b = true; let sb = Symbol(‘s’); let nn = NaN   Common reference types: const obj = {x: 100}; const arr = [1, 2, 3]; Const n = null; / / special reference type, null pointer //Special reference type, but not used to store data, so there is no “copy, copy function” theory function fn(){} console.log(typeof obj) //obj console.log(typeof arr) //obj console.log(typeof n)   //obj console.log(typeof fn)  //function   Typeof operator: 1. Identify all value […]

  • Detailed explanation of Ajax tutorial examples

    Time:2020-9-19

    What is Ajax Ajax = asynchronous JavaScript and XML. AJAX is not a new programming language, but a new way to use existing standards. AJAX is the art of exchanging data with the server and updating parts of a web page without reloading the entire page (AJAX is a technique for creating fast dynamic web […]

  • Implementation code of wechat applet silent login

    Time:2020-9-19

    1. Pass wx.login Get login Certificate (code) wx.login({ success: function (res) { console.log(res.code); } }) 2. Get it here Appid and secret: https://developers.weixin.qq.com/sandbox As shown in the figure 3. Applet http://127.0.0.1 : 8080 / jeecg boot is your own access path //app.js App({ globalData: { appid: ”, appsecret: ”,// openid: ” } onLaunch: function () […]

  • Arrangement of front end interview questions — principle of Vue bidirectional binding

    Time:2020-9-18

    Vue2.0 and 3.0 direct two-way binding principle, and tell the difference. code: Principle of vue2.0 / 3.0 bidirectional data binding full name: full name: <span style=”background-color: #f5f5f5; color: #008000;”>//</span><span style=”background-color: #f5f5f5; color: #008000;”> 2.0</span> <span style=”background-color: #f5f5f5; color: #008000;”>//</span><span style=”background-color: #f5f5f5; color: #008000;”> ES5: Object.defineProperty Implementation of data hijacking</span> <span style=”background-color: #f5f5f5; color: #000000;”> let […]

  • Implementation of no refresh paging with Ajax + smart technology

    Time:2020-9-18

    Here we use Smarty template, which is simpler In this paper, the main technology: Ajax, PHP, Smarty, in addition to their own package of a very simple class Class: (function(){ function $(id) { return document.getElementById(id); } $.init=function() { try{return new XMLHttpRequest();}catch(e){}; try{return new ActiveXObject(‘Microsoft.XMLHTTP’);}catch(e){} Alert (‘Please change browser ‘); } $.get=function (url,data,callback,type) { var xhr […]

  • Small program custom template to achieve the function of ceiling

    Time:2020-9-18

    This example for you to share a small program to achieve the specific code suction function, for your reference, the specific content is as follows //As shown in the figure – here we use custom components to realize the function of small program ceiling //WXML <view> <i-sticky scrollTop=”{{scrollTop}}”> <i-sticky-item i-class=”i-sticky-demo-title”> <view slot=”title”> first floor </view> […]

  • Three ways to implement cross domain Ajax (proxy, jsonp, xhr2)

    Time:2020-9-17

    Domain: domain is the security boundary of Win2K network system. We know that the most basic unit of a computer network is “domain”, which is not unique to Win2K, but active directory can run through one or more domains. On an independent computer, domain refers to the computer itself. A domain can be distributed in […]

  • Learn JavaScript basics every day (2) — do you add or don’t add semicolons in JavaScript?

    Time:2020-9-17

    Do you want to add or not to the semicolon in JavaScript? 1. Preface Most of the programming languages we’re exposed to usesemicolonAs the end of the code, separate the program statements, as does JavaScript. This is very important to enhance the cleanliness and readability of the code. Without a separator, the end of one […]

  • Wechat applet based on movable view to achieve the effect of sliding deletion

    Time:2020-9-17

    A perfect sliding deletion effect based on movable view Foreword: we use a lot to achieve the effect of sliding deletion, which is not very satisfactory. Finally, we use the official sliding component of small program to realize it, but this component has a little hole, let’s take it slowly 1. Wxml layout <view> <view […]