Lenix

The case of jquery disappearing and hiding pictures in turn through recursion

The case of javascript jquery disappearing and hiding pictures in turn through recursion <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <title>Title</title> <style> div{ width: 400px; } img{ width:90px ; height:90px; vertical-align: top; } </style> </head> <body> <input type=”button” value=”hidden animation” id=”btn1″/> <input type=”button” value=”show animation” id=”btn2″/> <div> <img src=”images/1.jpg”/> <img src=”images/2.jpg”/> <img src=”images/3.jpg”/> … The […]

The case of jquery disappearing and hiding pictures in turn through recursion Read More »

jquery how to get label content

The method of jquery to get the content of the label: 1. Use the “$(‘#id’).val()” method to get the value of the label; 2. Use the “$(‘#id’).text()” method to get the middle of the label 3. Get the html content in the tag through the “$(‘#id’).html()” method. Recommended: “JavaScript Basic Tutorial” get value of label

jquery how to get label content Read More »

How to add jquery’s val() value

var hdcval = $(“#hdelsecount”).val(); hdcval += icount + “,”; $(“#hdelsecount”).val(hdcval); Appends a value to a hidden field. . Original is 0 icount is the number passed in think so $(“#hdelsecount”).val(icount+”,”); I thought I could repeatedly append values, such as 1, 2, 3, 4, but the val() method is overridden. Instead of appending characters to the

How to add jquery’s val() value Read More »

input carriage return trigger event

need You need to enter text in the search box and press Enter to trigger the search event accomplish page code <div class=”index-search”> <input type=”text” name=”indexSearch” class=”inp” value=”<s:property value=”front.key”/>” onkeydown=”tab(event)” placeholder=”Search in this store” id=”ssubmitStore”> <img class=”icon icon-search” src=”/images/djimart-supplier-home/icon_search1.png”> </div> Effect When we enter characters in the text box above, press Enter to achieve automatic

input carriage return trigger event Read More »

Nodejs create server steps

1. Introduce the http module. This module is a built-in module const http = require(‘http’) 2. There is a createServer() function on http to create a server. const server = http.createServer() //得到个服务器对象 3. Listen to the event: listen to the request event sent by the user server.on( ‘request’,function(req,res){ /* req:request简写。语法上只是一个形参而已,请求消息 res:response简写,响应消息 */ console.log(‘一个用户发起了请求’) //此时这里没有响应。按照协议:一个请求必须对应一个响应啊。 res.end(‘hello

Nodejs create server steps Read More »

Build a simple server with nodejs

1. Nodejs server setup nodejs writes a server that others can access; http protocol: a specification that browsers and servers abide by; The communication between the http server and the browser is realized through http Our server, the most important part, is monitoring, that is to say, if http sends a request to the server,

Build a simple server with nodejs Read More »

Socket network communication

Socket network communication What is Socket? Socket is actually a socket. Most people’s understanding of Socket is that it can realize a simple network communication, but it “specifically solves what problems? What practical role does it have? Why does a Socket appear?” Socket is actually a product between the application layer and the transport layer.

Socket network communication Read More »

RabbitMQ installation steps in windows10 environment

RabbitMQ installation steps in windows10 environment installation steps 1. Install erlang (need to configure environment variables) 2. Install RabbitMQ (plug-in required) 3. Test login Fourth, create users 1. Install erlang 1. Download address: http://www.erlang.org/downloads 2. Configure environment variables: (system variables) 变量名:ERLANG_HOME地址:到bin的上一级目录 3. Double-click the system variable path Click “New” and add %ERLANG_HOME%\bin to the path.

RabbitMQ installation steps in windows10 environment Read More »

rabbitmq high availability, rabbitmq master-slave, rabbitmq mirror

[1] Architecture introduction Ordinary cluster: active-standby architecture, just to implement the active-standby solution, so that the main node will not be down and the entire service will not be available Mirror cluster: synchronization structure, queue synchronization based on common cluster implementation (1.1) rabbitmq master-slave cluster The slave node replicates all data and state of the

rabbitmq high availability, rabbitmq master-slave, rabbitmq mirror Read More »

Go channels and locks

How to communicate between different goroutines? There are two options: 1. Mutex of global variables 2. Use pipeline channel to solve Because there is no lock on the global variable m, there will be a resource contention problem, and an error will occur in the code, prompting concurrent map writes var ( myMap = make(map[int]int,

Go channels and locks Read More »