JS Operating dom Node and Compatibility
parentNode
What you get is your own father (direct relationship)
// Click on the child to hide the father
<script>
window.onload = function(){
var child = document.getElementById("child");
child.onclick = function(){
this.parentNode.style.display = "none";
}
}
</script>
Brother node ...
Posted by chrisio on Mon, 01 Jul 2019 14:41:19 -0700
Three ways for front-end to send get and post requests
1. Sending requests with XMLHttpRequest objects
(1) get request
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState== ...
Posted by henry gayman on Sun, 30 Jun 2019 16:43:32 -0700
Make a simple box chart with JavaScript
Story Background: These days, I met a customer who took minutes of the meeting. During each meeting, a special device would record the position of the speaker and display it in an angle value. He gave me the angle value, and let me make a chart for him to show everyone's approximate position.
Customers think of using Echarts charts to do it, I ...
Posted by Savahn on Sun, 30 Jun 2019 16:02:25 -0700
JS(9) Event Handling
I. HTML Event Processing
1. Advantages:
Specifying event handling in HTML creates a function that encapsulates the value of element attributes. This function has a local variable event, that is, event object, through which event object can be accessed directly.
You can use with to extend the scope to allow time handlers to access other for ...
Posted by haroon on Fri, 28 Jun 2019 11:15:16 -0700
javaScript--Analysis of Reduced Array Method
Overview: Array in javaScript contains not only reduce methods, but also foreach,map,filter and so on. Here we mainly introduce reduce methods.
Reduc () accumulates data from left to right until the end is a value (that is, the final result), which sounds abstract. The accumulated attention can be either data or string editing.
1. Grammar:
a ...
Posted by eric_e on Tue, 25 Jun 2019 17:33:20 -0700
Teach you how to access public number blog barrage
I wonder if you have ever thought about this. When Wechat's personal public number is becoming more and more popular and the media is becoming more and more popular, have you ever thought about applying for a Wechat public number of your own? In the circle of friends, more and more small partners are forwarding articles in their Wechat Public N ...
Posted by jzimmerlin on Tue, 25 Jun 2019 10:59:26 -0700
Four Human Documents on React-router-dom Vs
Documents are referenced in ___________. https://reacttraining.com
Make your own website after work and use Reactjs to build it. Recent upgrades to react and webpack versions have made it difficult to start previous projects, which has caused a lot of confusion, so record it in case of trampling again.
Using Reactjs inevitably involves two esse ...
Posted by ultrasound0000 on Sat, 22 Jun 2019 11:03:09 -0700
On js object-oriented (2)
Introduction
As mentioned above, there are literal and factory modes and constructor modes for creating objects. It is found that they have their own shortcomings. So I will introduce several ways to create objects to try to find a painless mode (vii).
Prototype pattern
There will be a very obscure paragraph below, so keep up with it and don't ...
Posted by Tremor on Fri, 21 Jun 2019 16:52:18 -0700
Styles and image paths in config.js configuration page
Where is this article used? Let me start by saying that last week, I received a task. Because the company's business is to connect different banks, such as ICBC's red color and other banks'blue color by default, so in the case of page consistency, ensure that the buttons and ICON on the page are configurable, so that order changes a value [ ...
Posted by nonaguy on Wed, 19 Jun 2019 13:50:12 -0700
avalon project practice record
Original address: http://mtmzorro.github.io/201...
Project Background
Need to be compatible with IE7 (important persuasion to discard IE6 based on data support)
The last version of the traditional jQuery DOM development model, after numerous manual maintenance has been horrible to see
Core Business Processes, Maintainability and Robustness Req ...
Posted by immobilarity on Tue, 18 Jun 2019 17:20:07 -0700