Front-end object-oriented programming

Q: Does Javascript have objects? A: Yes. Q: How do you understand object-oriented programming? A: Let me use code to illustrate function Foo(who) { this.me = who; } Foo.prototype.identify = function() { return "I am " + this.me; }; function Bar(who) { Foo.call( this, who ); } Bar.prototype = Object.create( ...

Posted on Fri, 31 Jan 2020 16:50:01 -0500 by voitek

jQuery -- small rocket back to top case

Small rocket back to top case   1. Scroll the page. When the distance between the page and the top exceeds 1000px, the small rocket will be displayed. Encapsulated in scroll function, the current page distance from the top is $(window). Scrolltop > = 1000 fadeIn and fadeOut for small rocket display and hide   //When the page exceeds 1 ...

Posted on Fri, 31 Jan 2020 14:12:30 -0500 by Vebut

External network accesses internal network picture, traverses img of picture, and assigns value to src

Recently, articles are edited on the intranet. Articles contain pictures. Rich text edit boxes are used to write articles, which are pushed to the Internet. The Internet is pushed to wechat. But the picture address is under the intranet server. html picture access is a browser request, so the intranet pictures cannot be accesse ...

Posted on Fri, 31 Jan 2020 12:12:59 -0500 by bstruss

Making websocket application easily with mongols

It is very suitable to use websocket as chat system. mongols It is an open source c + + library running on linux system, which can easily open a websocket server. First, build a websocket server. #include <mongols/ws_server.hpp> //websocket server int main(int,char**){ int port=9090; const char* host="127.0.0.1"; mongols::ws_server se ...

Posted on Fri, 31 Jan 2020 11:19:52 -0500 by MarcB

Fast drawing with Echarts - rendering histogram and line graph in real time based on data

Echarts ECharts, an open-source visualization library implemented by JavaScript, can run smoothly on PC and mobile devices, compatible with most of the current browsers (IE8/9/10/11, Chrome, Firefox, Safari, etc.), the bottom layer relies on the lightweight vector graphics library ZRender, providing intuitive, interactive and ...

Posted on Fri, 31 Jan 2020 09:22:28 -0500 by kaupp

Corrilization, partial function and anti corrilization

currying describe Coriolis calculus is a special partial function, which transforms a multi parameter function into multiple single parameter functions, that is to say, transforms a function with n parameters into n univariate functions Example // Normal writing function add (a, b) { r ...

Posted on Fri, 31 Jan 2020 02:10:39 -0500 by cyronuts

Event bubbling mechanism and how to prevent bubbling

1, Event bubbling In the browser client application platform, it is basically event driven, that is to say, to execute an event, and then make corresponding operations. Event bubbling is when an event starts, it is accepted by the most specific element (the lowest node in the document) and then propagated to the least specifi ...

Posted on Fri, 31 Jan 2020 00:16:06 -0500 by micmania1

HTML+CSS learning Chapter 5 jump links + jump anchors + special symbols

Jump link Link label A - > double label < a ></a> href attribute: address of the link target attribute: you can change the way the link is opened. By default, open a new window on the current page Base - > single label: the function is to change the default behavior of links.Small ex ...

Posted on Thu, 30 Jan 2020 23:52:00 -0500 by Thuy

HTML+CSS learning Chapter 5 jump links + jump anchors + special symbols

Jump link Link label A - > double label < a ></a> href attribute: address of the link target attribute: you can change the way the link is opened. By default, open a new window on the current page Base - > single label: the function is to change the default behavior of links.Small ex ...

Posted on Thu, 30 Jan 2020 23:47:08 -0500 by madmindz

2, Front end development HTML

2, Front end development language system HTML Article directory 2, Front end development language system HTML HTML5 form Mapping Multi-Media HTML5 common API Reference articles HTML5 form HTML forms are used to collect different types of user input. Element defines the HTML form. Form el ...

Posted on Wed, 29 Jan 2020 23:58:44 -0500 by rscott7706