JS string method
catalogue
1,indexof()
2,charAt()
3,concat()
4,substring()
5,substr()
6,slice()
7,replace()
8,replaceAll()
9,split()
10,trim()
11,match()
1,indexof()
indexOf()
Method returns the
String
The index of the specified value that first appears in the object, from
fromIndex
Search at
Cable. Returns if the value is not ...
Added by waygood on Mon, 14 Feb 2022 14:54:04 +0200
Building a JavaScript single page application without a framework
Build a JavaScript Single Page App Without a Framework - SitePoint
The front frame is great. As your projects evolve, they can be structured in a way that allows you to understand most of the complexity of your application and help you organize it in a single page.
However, there is also a downside: these frameworks incur a certain degree of ...
Added by eddedwards on Mon, 14 Feb 2022 14:31:39 +0200
element ui upload picture usage
Through slot You can import custom upload button types and text prompts. You can limit the number of uploaded files and define the behavior when the limit is exceeded by setting limit and on-exceed ed. You can prevent file removal by setting before remove.
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/pos ...
Added by davidp on Mon, 14 Feb 2022 14:18:45 +0200
js advanced -h5 new features
New label
Represents a block
Represents an article. Such as articles, comments, posts and blogs
Represents a header
Represents a footer
Indicates navigation
Represents the sidebar. Such as the sidebar of the article
Indicates media content grouping (less used) ...
Added by IceHawk on Mon, 14 Feb 2022 14:07:14 +0200
Front end foundation label
1. Special symbols
Sharp horn < left horn > right horn Space: &Nbsp: the space occupies the width [font] and has a strong influence &Emsp: the width occupied is exactly one Chinese width, and it is basically not affected by the font Version: & copy Trademark: & Trade & reg
2.div and span labels
div: it has no specif ...
Added by obesechicken13 on Mon, 14 Feb 2022 13:44:47 +0200
How to optimize a large number of if/else, switch/case in the code?
If there are many if else in the code, it is difficult to read and maintain. A programmer who doesn't reconstruct if else into high-quality code is not a good programmer.
To be clear, not all if / else and switch / cases need to be optimized. When we find that there are "pain points" or "smell bad code", it is best to optim ...
Added by telsiin on Mon, 14 Feb 2022 13:12:34 +0200
BOM and DOM operations
BOM and DOM operations
What are BOM and DOM
BOM refers to the object model of the browsing area, which enables js to operate the browser through it DOM refers to the document object model, which enables js to operate the front-end page (that is, all elements of HTML document)
BOM needs to master operation
window.open() - Open a n ...
Added by chris davies on Mon, 14 Feb 2022 13:06:18 +0200
[Vue technology stack development foundation guide]
Vue front end development framework
Vue cli project scaffold is based on Vue JS for rapid development of a complete system
Document address https://cli.vuejs.org/zh/
Install node js https://nodejs.org/zh-cn/Install Vue cli scaffold
npm install -g @vue/cli
Create a vue project
Execute command vue create hello-world(Project name) Quickly ...
Added by Ryanz on Mon, 14 Feb 2022 11:38:58 +0200
Regular expression explanation of Shell script
I regular expression
1. Concept of regular expression
Regular expression, also known as regular expression, is often abbreviated as regex, regexp or RE in code. It is a concept of computer science. Regular expressions are often used to retrieve and replace text that conforms to a pattern (rule).
There is not only one regular expression, and ...
Added by paxman356 on Mon, 14 Feb 2022 08:29:46 +0200
Summary of common methods of jQuery
$.grep()
$.grep( array, function(elementOfArray, indexInArray) [, invert ] )
Function: find the array elements that meet the filter function:
<script src="js/jquery1.42.min.js"></script> <script type="text/javascript"> $(function () { var arr = [23,45,5,1,4,67,8,100,-2]; var arrGrep = $.grep( ...
Added by Cong on Mon, 14 Feb 2022 07:00:02 +0200