Javascript formatting and highlighting xml strings

Javascript formatting and highlighting xml strings Two key points Parsing xml with DOMParser Recursively traverses the xml tree and outputs each node in a format About using DOMParser This method is currently supported in IE9 and other browsers, so we are not writing about the situation that is not supported in IE9 or below. Please skip to fo ...

Posted by aznkidzx on Sat, 04 Jan 2020 20:57:08 -0800

IOS iframe height adapts to content

Problem: on iOS, a page is nested by iframe. An element displayed at the bottom of the page in the content page cannot be displayed. The position of this element is fixed. Reason: because the height of Safari's iframe under iOS will adapt to the content of the page, resulting in the height of iframe is too high (that is, the h ...

Posted by mrhalloran on Sat, 04 Jan 2020 18:37:17 -0800

Using phantomjs to screen the web page

PhantomJS is a server-side JavaScript API based on WebKit. It fully supports the web without browser support. It supports various Web standards in a fast and native way: DOM processing, CSS selectors, JSON, Canvas, and SVG. PhantomJS can be used for page automation, network monitoring, page screenshots, and interface free testi ...

Posted by ElectricRain on Sat, 04 Jan 2020 17:22:07 -0800

Common methods of JS array

I. array 1,function(value, index, array) {} [Format: function (value, index, array) => { // value The value of the index group's current traversal, index The subscript of the index group's current traversal, array Refers to the current array // ... Custom function behavior // return ...; }   2,Array.map(function() {}) Return v ...

Posted by migmedia on Sat, 04 Jan 2020 16:45:21 -0800

HTML 5 Tags - < canvas >

Convas canvas: Canvas API (canvas) is a new tag in HTML5, which is used to generate images in real time on Web pages, and can operate image content. Basically, it is a bitmap that can be operated by JavaScript <body> <! -- Note: the width and height set on the tag is the original width and height Canvas API (canvas ...

Posted by solus on Sat, 04 Jan 2020 15:51:21 -0800

[original] brainless operation: HTML5 + CSS + JavaScript to realize the competition schedule

1. Background: friends, please help to make a competition scheduling software 2. Requirements: ① If the number of participants is unknown, the name of participants can be read from the text file; ② The participants are randomly divided into two groups, two PK in one group. If the number is odd, one of the participants will be promoted automa ...

Posted by roomyz on Sat, 04 Jan 2020 09:52:41 -0800

Soul Torture: Do you know all the Vue template syntax?

Author| Jeskson Excavation| https://juejin.im/user/5a16e1f3f265da43128096cb The founder of Vue.js is Yuyuxi. In 2014, Vue.js was officially released, and in 2015, it was officially released as version 1.00.VUE.JS is a progressive JavaScript framework with declarative rendering, component systems, client routing, centralized state management, ...

Posted by kingconnections on Sat, 04 Jan 2020 08:44:26 -0800

PHP Socket server building and testing

1.socket server building ideas 1) Objective: to understand the working mechanism of socket server 2) Idea: create socket - > Add socket to connection pool - > process receiving information - > handshake action - > send information   2.socket server code Note: copy to php file, direct command line can run, no other support is requi ...

Posted by jdiver on Fri, 03 Jan 2020 23:13:03 -0800

phpcmsV9 custom prompt page style

phpcmsV9 custom prompt page style The corresponding modified file is: phpcms/templates/default/content/message.html First, let's take a look at the renderings before and after customization, as follows: Custom UI style - all codes, refer to the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E ...

Posted by edwardp on Fri, 03 Jan 2020 21:26:27 -0800

Study and arrangement of vue components

1. Locally registered components are not available in their subcomponents. 2. For props, it is camelCase in JavaScript, kebab case in html, and unlimited in string template. props: { propA: Number, // Basic type checking ('null 'matches any type) propB: [String, Number], // Multiple possible types propC: ...

Posted by scerm on Fri, 03 Jan 2020 16:49:12 -0800