JS learning notes (Chapter 10) (DOM operation technology)

1. Dynamic script There are two ways to create dynamic scripts: inserting external files and directly inserting Javascript code. (1) calling external files function loadScript(url) { var script = document.createElement("script"); script.type = "text/javascript"; script.src = url; document.body.appendChild(script); } //Cal ...

Posted on Tue, 15 Oct 2019 08:43:53 -0700 by LexHammer

2. Sharing among threads

Sharing between threads Synchronization object lock and class lock Synchronization is a synchronization lock for multithreaded keywords. It can modify the following objects: Code Block: The modified code block is called Synchronized Code Block. The scope of the function is the code in {} and the object of the function is the object that calls t ...

Posted on Mon, 14 Oct 2019 06:42:03 -0700 by jackthebookie

Experience in using jquery.lazyload.js

Today, I want to do some optimization in the project, do a lazy loading, I use jquery.lazyload.js, website: http://www.jq22.com/jquery-in.... The case given is for img, and then I wonder if it can be implemented in the background image. Looking at the source code roughly, it seems to have this function: I posted the code I tested, including img ...

Posted on Tue, 08 Oct 2019 13:50:19 -0700 by mrMarcus

Write a Rotating Cube Block with css3

Write a Rotating Cube with css3 Animation + html Write a three-dimensional rotating cube by using the properties of css3's rotating translation 3D and so on. First we write the structure of a cube, six faces of a cube, so we write six div s. Then write out the initial style to set the size of the box, ...

Posted on Tue, 08 Oct 2019 13:44:09 -0700 by ssailer

python crawl for Sogou articles (IP proxy pool and user agent pool settings)

Links to the original text: https://www.jianshu.com/p/a250c44b1498 note 1. Anti-reptile mechanism processing ideas: Browser camouflage, user agent pool; IP restriction - --- IP proxy pool; Asynchronism of ajax and js - - - grabbing bags; ...

Posted on Mon, 07 Oct 2019 14:49:41 -0700 by jxrd

Bootstrap Scrolllspy

Explain: There must be a resolvable identifier corresponding to the elements in the dom: <a href=" home"> </a> <div_id= "home"> </div> According to jquery, invisible target elements will be ignored and their corresponding navigation items will never be h ...

Posted on Sun, 06 Oct 2019 12:47:15 -0700 by headcutter

Slider verification implemented by sliderVerify, a layui extension component

First, introduce'. / sliderVerify/sliderVerify.js'into the static file code to be used‘ Look at the effect first.           Sample code <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <meta name="renderer" content="webkit"> <meta http ...

Posted on Fri, 04 Oct 2019 17:25:37 -0700 by Alexhoward

Python: Selenium Chrome Bulletless Window + property/attribute/text

When we use Selenium to write automation programs, we don't want the program to play Chrome window all the time during the actual operation. At this time, we need to let Chrome open silently, read data automatically, and then close silently. The following is a method for chrome to open in a non-interfac ...

Posted on Fri, 04 Oct 2019 11:21:31 -0700 by spaggle

input placeholder compatibility in IE10, 9, 8 and other browsers

Links to the original text: https://www.cnblogs.com/2010master/p/6194291.html 1. In IE10 + browser, the input tag will have a default style, such as the'*'number of the text box and the small eyes of the password box. The original intent ...

Posted on Thu, 03 Oct 2019 12:03:41 -0700 by Gustav

Introduction to web Front-end to Practice: A Simple Summary of Graceful Degradation of css Animation

A Simple Summary of Graceful Degradation of CSS Animation CSS Animation Related Properties transition: compatibility Transf3D: Compatibility Transf2D: Compatibility animation: You can see that animation is totally unsupported in IE8 and below, IE9 only supports transform (not transform3d) graceful ...

Posted on Wed, 02 Oct 2019 06:19:57 -0700 by jbalanski