<el-input onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" maxlength="8" > Limit the number input and the maximum length is 8 </el-input> ... Read the full text »
barben
Six years ago (January 8, 2020) 33651 Browse 0 Comments
eleven Likes
Can only be numbers and commas/^ [ d,]*$/ Verify that the phone number is basically correct/^ 1 [345789] d {9}$/ Enter multiple mobile phone numbers separated by commas. Commas/^ (1 (3 | 4 | 5 | 7 | 8) d {9}) (, (1 (3 | 4 | 5 | 7 | 8) d {9}) cannot appear at the beginning and end of each mobile phone number*$/ The password length is 6-18 digits, and numbers, letters, and symbols contain at least two types of/(?! ^ [0-9]+$) (?! ^ [A-z Read the full text »
barben
Six years ago (2019-12-17) 3212 Browse 0 Comments
eleven Likes
Today, I took over the project of a big guy. When problems occurred, I upgraded Node.js and Vue cli. I found that the scaffolding version has reached 4.1.1! In order to see what the difference is after the scaffold is upgraded, we set up a project. Next, vue create emmmm is as fierce as a tiger You may use special comments to disable some warnings. U ... Read the full text »
barben
Six years ago (2019-12-10) 16017 Browse 1 Comments
eight Likes
case analysis There is a div with copyright information on the page. Set the fixed location at the bottom. Every time I open the console, this div will mask the "Login Now" button. Because after the page height changes, the fixed positioning will make the div move up, which just blocks the buttons below. I have to implement it now: div is displayed on the top without blocking the elements below [Normal browser size] [When the console is opened Read the full text »
barben
Six years ago (2019-10-22) 39163 Browse 2 Comments
nine Likes
Today's test gave me another bug. Clicking the function button in the platform will directly refresh the page. After taking a look at the code, I still wonder when the button has a default click event? Finally, I found that the problem was in the form! <form> <button>OK</button> </form> <! -- Use the button tag in the form, possibly .. Read the full text »
barben
Six years ago (October 12, 2019) 5428 Browse 0 Comments
six Likes
——Record this time that I took off my pants to fart in order to realize the internal value of the listener When writing a bug today, I need to use the watch to monitor whether a value in the object has changed. I thought for a long time data() { return { register: { username: "" } } } ↑ Yes, I just want to wat Read the full text »
barben
Six years ago (2019-09-25) 2991 Browse 0 Comments
eight Likes
Split text using split method When writing an item, one function is to cut the text into arrays by spaces or newlines. In fact, only one sentence is needed var phone = "110 119 120"; phone.split(/[\s\n]/); // ["110", "119", "120"] The effect is as follows ... Read the full text »
barben
Six years ago (August 23, 2019) 13820 Browse 1 Comments
eight Likes
Set the top, bottom, left and right center for elements of known size Product Manager: I have a 200 × 200 picture here. Please help me display it in the middle of the browser! [Method 1] After positioning, set 0 at the top, bottom, left and right positions, and finally set the margin to auto! .photo { width: 200px; height: 200px; position: fixed; top ... Read the full text »
barben
Six years ago (2019-08-06) 3575 Browse 0 Comments
eight Likes
Let's make an analogy I have a web page. When I open it, I will pop up an announcement or advertisement. Anyway, I will pop up a window. If you don't click something like "Don't remind me again", it will pop up next time!!! For example, who and why did you hit him? Implementation method: After the user clicks "Don't pop up again", a value will be written, for example: buttonchuang=true. Every time the page is loaded, it will be judged that buttonchuang Read the full text »
barben
Six years ago (2019-06-11) 3919 Browse 0 Comments
ten Likes
Remember that the following fields need to be submitted when using Baidu Translation API last week. Field Name type Required parameter describe remarks q TEXT Y Request translation query UTF-8 encoding from TEXT Y Translation source language For example: zh Chinese, en English, can be set to auto automatic detection to TEXT Y Translation language For example: zh Chinese, en English, cannot be set to auto auto detection appid INT ... Read the full text »
barben
Six years ago (2019-05-30) 3449 Browse 0 Comments
ten Likes