[code segment] set the width and height of iframe label automatically according to the sub page

[code segment] set the width and height of iframe label automatically according to the sub page This code function can automatically modify the width and height of iframe label in the parent page according to the width and height of the child page loaded by iframe to fully display the child page To configure T ...

Added by Wo0tHigh on Tue, 31 Mar 2020 13:38:49 +0300

Front end replication

Replication mainstream implementation At present, there are four main ways of copy: ZeroClipboard.js, Clipboard.js, execCommand Differences in replication ZeroClipboard: it's the most compatible. It can be fully compatible with chrome/firefox/ie/safari, but the plug-in is large, 230KB. The implementation method is fl ...

Added by andynick on Tue, 31 Mar 2020 01:50:56 +0300

vue interceptor implements unified token and is compatible with IE9 verification

In the project, vue is used to build the front-end page, and axios requests the back-end api interface to complete the data interaction. If the password token is written in each interface, it is not only a small physical work, but also inflexible. Here we share the use of vue's own interceptor to add token to the header of each request, and it ...

Added by Seamless on Mon, 30 Mar 2020 18:25:36 +0300

Abstract Factory Mode for Creative Mode

1 Overview Last article Speaking of the factory method pattern, it provides a solution for creating class instances without specifying a specific implementation.So why do we need the abstract factory model? 2 Abstract Factory Mode The abstract factory model is essentially also a factory defined as an entry for class creation, which has the adva ...

Added by bhogg on Sat, 21 Mar 2020 07:53:49 +0200

The difference between innerText and innerHtml

innerText and innerHtml are text messages between printed labels 1. innerText prints the plain text information between tags, which will filter out the tags. The lower version of Firefox does not support textContent, but supports textContent <!doctype html>   <html lang="en">   <head>       <meta charset ...

Added by pesale86 on Fri, 20 Mar 2020 19:07:48 +0200

JavaScript global error handling

I want to catch every undefined function error thrown. Is there a global error handling tool in JavaScript? The use case is to capture undefined flash function calls. #1 building How to catch unhandled Javascript errors Assign the window.onerror event to the event handler, such as: <script type="text/javascript"> window.onerr ...

Added by Lassie on Thu, 05 Mar 2020 12:09:47 +0200

How do I programmatically set the value of a selection box element using JavaScript?

I have the following HTML < Select > elements: <select id="leaveCode" name="leaveCode"> <option value="10">Annual Leave</option> <option value="11">Medical Leave</option> <option value="14">Long Service</option> <option value="17">Leave Without Pay</option> </select> ...

Added by bugcoder on Sat, 22 Feb 2020 10:08:26 +0200

The selenium geckodriver executable using Python must be in PATH

I'm a new programmer. I started to use Python about two months ago. Now I'm studying Sweigart's "automatically writing boring things in Python text". I am using IDLE and have installed selenium module and Firefox browser. Whenever I try to run the webdriver function, I get the following information: from selenium import webdriver b ...

Added by Dongowarrior on Fri, 14 Feb 2020 09:48:31 +0200

LNMP dynamic website

LNMP Basics What is LNMP One of the mainstream enterprise website platforms 50: Linux operating system N:Nginx website service software M:MySQL.MariaDB database P: Website development language (PHP.Perl.Python) Difference between static website and dynamic website Static web page: (1) Static w ...

Added by filteredhigh on Sat, 11 Jan 2020 11:42:19 +0200

Create new DOM elements from HTML strings using built-in DOM methods or prototypes

I have an HTML string representing the element: '< li > text < / Li >'. The elements I want to attach to the DOM (in my case, ul). How can I do this using the Prototype or DOM methods? (I know I can do this easily in jQuery, but unfortunately we didn't use jQuery.) #1 building This will also work: $('<li>').text('h ...

Added by dlester on Fri, 10 Jan 2020 17:24:54 +0200