Basic knowledge of Javascript (1)

Since I have learned Java before, I will skip the same features and usage of Javascript and Java here. 1, Javascript output <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>js output</title> </head> <body> <p id="one"></p> <script type="text ...

Posted by alevsky on Fri, 01 May 2020 18:22:01 -0700

The 38th blog post of Xiao Liu

It's late, so I won't talk nonsense. I finished homework 5 today, but I'm in a bad state. I still can't study at home <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>homewrok5</title> <style> html, body{ margin: 0; padding: 0; ...

Posted by PHPnewby! on Fri, 01 May 2020 16:41:05 -0700

js base64 and canvas base64

1, js base64 Get the uploaded file myfile, create a fileRead file object, and use the readAsDataURL method to encode the read file into a Data URL. After the file is loaded successfully, e.target.result is the base64 encoding corresponding to the file image. The image can be displayed by assigning the src of img directly. <body> & ...

Posted by hardius on Fri, 01 May 2020 14:42:21 -0700

Using Tencent location service for mobile location

1. First, write a tool class to locate the function in common.js common.js: //Location service function entry function getLocationInfo() { if (localStorageUtils.acquireLocationInfo() == null ||localStorageUtils.acquireLocationInfo().curLongitude == null || localStorageUtils.acquireLocationInfo().curLatitude == null) { getCurrentL ...

Posted by bradles on Fri, 01 May 2020 13:19:07 -0700

Three.js promotion learning 2: building the basic components of three.js scenario

The learning content of this article comes from Three.js Development Guide: JavaScript 3D Library of WebGL Create scene There are three types of components needed for a scenario to display anything: assembly Explain video camera Decide what needs to be rendered on the screen light source Determines how materials are displayed a ...

Posted by johnc71 on Fri, 01 May 2020 10:18:30 -0700

2018-01-06 deep copy and shallow copy of javascript

catalog: What is replication? A simple shallow copy An example of deep replication Several general methods of deep and shallow replication Deep copy What is replication? Simple variable replication, small memory, we can directly copy without reference. First, deep copy and shallow copy are only for complex objects such as object and arra ...

Posted by kcorless on Fri, 01 May 2020 08:28:23 -0700

Object traversal method

Different return values of different methods traversing objects Pre Code: function Obj() { // Add properties directly on this this.prop_this = 'prop_this'; // Add symbol attribute on this this[Symbol.for('prop_symbol')] = 'prop_symbol'; } // Add attribute on Prototype Obj.prototype.propProto ...

Posted by kenle on Fri, 01 May 2020 04:13:47 -0700

Example used by JSONP and artTemplate template template engine -- request weather data

Example used by JSONP and artTemplate template template engine - Request weather data The first two articles briefly summarize The principle of cross domain request in jsonp , and The use of artTemplate template engine . So make a simple example of requesting weather. I don't know why. Yesterday's request for Baidu ...

Posted by praxiz on Fri, 01 May 2020 00:19:29 -0700

vue can't use El input of element UI to monitor the carriage return event

From: http://blog.csdn.net/u014520745/article/details/71746343 Only for learning, not for business!!! vue can't use El input of element UI to listen to the carriage return event. The reason is that the original event is hidden after the element UI itself encapsulates a layer of input tag. Therefore, the following code runs unresponsive: ...

Posted by johlwiler on Thu, 30 Apr 2020 17:33:46 -0700

Source code analysis of v-1.8.2 under core

V-1.8.2 source code analysis of anderscore (2) if(typeof exports !== "undefined") { if(typeof module !== "undefined" && module.exports) { exports = module.exports = _; } exports._ = _; } else { root._ = _; } Assign the local variable defined above to the property in the global objec ...

Posted by crackfox on Thu, 30 Apr 2020 11:59:38 -0700