Category:WEB Front End

  • Analysis of the implementation method of JavaScript system conversion

    Time:2020-4-2

    In this paper, an example is given to illustrate the implementation of JavaScript base conversion. To share with you for your reference, as follows: JavaScript base conversion Decimal to other base ToString () is called without parameters, that is, toString (10) is the default, If you want to display numbers in other bases, just pass […]

  • Practical examples of common API interfaces for HTML5 video

    Time:2020-4-2

    1、 Although some attributes are of boolean type, it is still recommended to write in XHTML (attribute name = attribute value) format to avoid errors (the bold attributes below are common attributes) attribute value Function description controls controls Show playback controls or not autoplay autoplay Set whether to play automatically after opening browser width Pilex […]

  • Div nesting HTML without iframe

    Time:2020-4-2

    In recent jobs, you need to nest pages without iframe, so you have to nest them in div with jQuery method. Copy code The code is as follows: <script type=”text/javascript”> $(document).ready(function() { $(“#button”).click(function() { $(“#content”).load(“index.jsp”); }); }); </script> As long as there are so many codes, the “button” is the ID of a button, and […]

  • Detailed explanation of the difference between CSS link and @ import

    Time:2020-4-2

    How to add CSS to HTML? There are three ways to set CSS in HTML: Inline embedded Import link Import – @ import 1. Inline. That is, set CSS in the style attribute of HTML tag. It is worth noting that the name value pairs of CSS code are connected with colon: and separate different […]

  • Ajax obtains the return parameters of PHP page and the method of control assignment

    Time:2020-4-2

    JS page $.ajax({ type : “get”, URL: ‘, // jump to page Data: “m = Content & C = favorite & A = del_favorite & shoucangid =” + _id, // parameters passed datatype : “html”, async:’false’, Success: function (data) // return value { if(data !=null) { Var STR = new array(); // define an array […]

  • [technical translation] write asynchronous tasks in modern JavaScript

    Time:2020-4-2

    This week, we will translate some technical articles. This time, we expect to translate three articles as follows: Generate static websites with nuxt How web content can affect power usage Write asynchronous tasks in modern JavaScript (https://web.dev/off-main-thread/) All my translated technical articles are put in a GitHub warehouse. If you find it useful, please click […]

  • Design a page with nunjucks template

    Time:2020-4-2

    Use nunjucks instead of EJS, because this is a more powerful template engine in nodeNunjucks official website Configure to use the nunjucks template engine The nunjuks template engine does not have specific restrictions on the suffix of template file namesIf the filename is a.html, a.html needs to be passed during renderingPass b.nujs if the filename […]

  • When there are too many options in the element UI drop-down list, we can solve the stuck problem by customizing the search

    Time:2020-4-2

    When using the select selector, if there is too much data in the drop-down list, there will be an obvious stuck experience, such as: Document <span style=”background-color: #f5f5f5; color: #000000;”> let options </span><span style=”background-color: #f5f5f5; color: #000000;”>=</span><span style=”background-color: #f5f5f5; color: #000000;”> []; </span><span style=”background-color: #f5f5f5; color: #0000ff;”>for</span><span style=”background-color: #f5f5f5; color: #000000;”>(let i</span><span style=”background-color: #f5f5f5; color: […]

  • An example analysis of the usage of join() in JS array method

    Time:2020-4-1

    The example of this article describes the usage of join () of JS array method. To share with you for your reference, as follows: Join () method Definition and usage:The join () method is used to put all elements in an array into a string.Elements are separated by the specified delimiter. Syntax: arrayobject. Join (separator) […]

  • Set the default text for the search box to disappear when you click

    Time:2020-4-1

    Copy code The code is as follows: < input type = “text” name = “kword” value = “search by project name…” onfocus = “if (this. Value = = ‘search by project name…’) this. Value = ‘;” onblur = “if (this. Value = =’ ‘) this. Value =’ search by project name… ‘;” style = “color: […]

  • Solution to the problem of blank screenshot of html2canvas

    Time:2020-4-1

    Recently, I met a requirement in the project, which needs to provide the function of web page screenshot. Baidu found that html2canvas is very easy to use. Then try it. Resource download address Plug in download address: html2canvas download address Usage mode The development mode of react component used in the project. Refer to the […]

  • CSS3 implements footer fixed at the bottom (always at the bottom no matter how high the page is)

    Time:2020-4-1

    Preface Fix the footer area at the bottom, no matter how wide the page is, it will not change at the bottom, just like the menu on the mobile end. <!DOCTYPE html> <html> <head> <meta charset=”utf-8″ /> <title>document</title> <!– css –> <style> #demo{ position: fixed; left: 0px; bottom: 0px; width: 100%; height: 50px; background-color: #eee; […]