Angular2.x/Typescript module introduced parsing
First, modules are introduced in two ways:1. Relative import:
import Entry from "./components/Entry";
import { DefaultHeaders } from "../constants/http";
import "/mod";
Relative import resolves relative to the file it was imported into and cannot be resolved to an external module declaration. You should use relative import for your own modules ...
Posted by Crowly on Thu, 09 Jan 2020 11:46:06 -0800
Jquery form validation plug-in validate
Write before:
When doing some adding functions, the form verification before submission is essential. The jquery validate plug-in is OK, which is enough for basic requirements. Record the basic usage here.
Let's write a simple demo
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Jque ...
Posted by jcd on Thu, 09 Jan 2020 08:01:17 -0800
PHP + infinitscoll to realize infinite scrolling and loading data instance of web page
PHP + infinitscoll implements infinite scrolling of web pages to load data instances. The implementation principle: when the scroll bar is a certain length from the bottom of the web page, send the number of pages to the background and get data.
First, we put 10 pieces of data on the page, that is, the first page. Each item is a p tag:
1 <d ...
Posted by sweatje on Thu, 09 Jan 2020 07:14:42 -0800
How to use jQuery to distinguish left mouse button from right mouse button
How do I use jQuery to get the mouse button I click?
$('div').bind('click', function(){
alert('clicked');
});
This is triggered by the right mouse button and the left mouse button. What is the way to capture the right mouse button? I would be happy if the following existed:
$('div').bind('rightclick', function(){
alert('right m ...
Posted by GaryE on Tue, 07 Jan 2020 22:02:53 -0800
Play audio using Javascript?
I'm making games with HTML5 and Javascript.
How to play game audio through Javascript?
#1 building
If you don't want to clutter HTML elements:
var audio = new Audio('audio_file.mp3');
audio.play();
var audio = new Audio('https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3'); audio.play();
T ...
Posted by coderWil on Mon, 06 Jan 2020 05:29:44 -0800
Encapsulate a table with search for each column
Using the customized header of element ui, the effect is as follows:
Code:
<template>
<div class='searchtable'>
<el-table
:data="tableData"
border
@sort-change='sortColumns'
@selection-change="handleSelectionChange"
@row-click='clickRow'
ref='commontable'
:cell- ...
Posted by Cooper94 on Sun, 05 Jan 2020 21:17:20 -0800
JQuery implementation of the carousel graph and its principle
Source code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>JQuery Rotation chart</title>
<style>
*{
padding:0;
margin:0;
...
Posted by Pig on Sun, 05 Jan 2020 00:36:42 -0800
Install Grok Debugger locally
1.Ruby installation. Note: do not use the latest 2.2 or 2.3 version of ruby. Some components may not be installed
yum -y install openssl-devel gcc
wget https://ruby.taobao.org/mirrors/ruby/2.1/ruby-2.1.7.tar.gz
tar zxf ruby-2.1.7.tar.gz
cd ruby-2.1.7
./configure --prefix=/usr/local/ruby2.1.7
make && make install
echo ...
Posted by minifairy on Sat, 04 Jan 2020 09:06:08 -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
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