Lenix

ubuntu environment variable settings

Linux is a multi-user operating system. After each user logs in, there will be a dedicated operating environment. Usually, the default environment for each user is the same, and this default environment is actually the definition of a set of environment variables. Users can customize their own operating environment by modifying the corresponding system environment

ubuntu environment variable settings Read More »

JS – input input box, click Enter to submit or perform other operations

$(“input”).keydown(function(event){ if (event.keyCode == 13) { /* Submit or other operations */ } }); Reprinted at: https://ift.tt/zLJg5Y6 … The post JS – Input input box click enter to submit or do something else first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/9332 This site is for inclusion only, and the copyright belongs

JS – input input box, click Enter to submit or perform other operations Read More »

Composer domestic full mirror image

The full amount of composer images that can be used in China is specially organized. mirror usage $ composer config -g repo.packagist composer mirror address $ composer clearcache $ composer update || install Note: If the project has been installed from other sources before, you can delete the composer.lock and vendor directories and regenerate. close

Composer domestic full mirror image Read More »

Javascript Fetch API Tutorial

fetch() is an upgraded version of XMLHttpRequest for making HTTP requests in JavaScript scripts. Browsers provide this object natively. This chapter details its usage. directory [ hidden ] Basic usage Response object: handles the HTTP response Synchronized properties of the Response object Determine whether the request was successful Response.headers property How to read content Response.clone()

Javascript Fetch API Tutorial Read More »

WebSocket usage tutorial

WebSocket is a network communication protocol that is required for many advanced functions. Anyone who is new to WebSockets asks the same question: we already have the HTTP protocol, why do we need another protocol? What benefits can it bring? The answer is simple, because the HTTP protocol has a flaw: communication can only be

WebSocket usage tutorial Read More »

Use the javascript Page Visibility API to determine whether the user has closed the browser window (html page)

Page Visibility API Introduction Sometimes, developers need to know that the user is leaving the page. The common method is to listen for the following three events. pagehide beforeunload unload However, these events may not fire on the phone, and the page just closes. Because the mobile phone system can directly transfer a process to

Use the javascript Page Visibility API to determine whether the user has closed the browser window (html page) Read More »

JS implements countdown function

I. Introduction When the website is doing an activity, a prompt will appear with a countdown to the deadline. The effect is as shown in the figure: 2. Analysis ①Reminder time is constantly changing every second, you need to use timer (setInterval) //1000表示每隔一秒变化一次,单位为毫秒setInterval(countDown, 1000); ②The three boxes are assigned values ​​through innerHTML, and the hours,

JS implements countdown function Read More »