expression that matches the current phone number validation.
var reg =/^1[3|4|5|7|8][0-9]{9}$/; Validation Rule
var phonenum = ' 15507621999 '//Mobile number
var flag = reg.test (phonenum);//true
But have you ever thought that maybe this second code might add one at a time, like starting with 16? 19 to begin with. Who knows the future, our code to ensure that a few years no problem, so you can not verify the second rule:
code from http://caibaojia
Bootstrap's deployment usel works with dropload. js to implement sliding switching between images on mobile terminals,
A slideshow can jump to the previous or next one by clicking the button. On the Mobile End, we often use sliding to achieve some time. How can we achieve this.
The following describes how to use bootstrap's pluusel and dropload.
JS to determine whether the user's browsing device is a mobile device or a PC
determine the source that opens the page in detail
varBrowser ={versions:function () { varU = navigator.useragent, app =navigator.appversion; return{//Mobile Terminal browser version informationTrident:u.indexof (' Trident ') >-1,//IE kernelPresto:u.indexof ('
This article explained the JS to determine whether the mobile end of the installation of a variety of app methods, to share with you for your reference, the specific contents are as follows
The first method:
One: Judging is the kind of equipment
var isandroid = u.indexof (' Android ') >-1 | | U.indexof (' Linux ') >-1; Android Terminal or UC browser
var Isios =!! U.match (/\ (i[^;] +;( U;)? Cpu.+m
Recently in a project, using jquery Mobile, very unfamiliar to him, the problem of one after another, it is necessary to solve, find a day this problem, put can understand:First understand JQM inside page jump by default is through the AJAX request, must re-refresh the page JS square can be effective, that is, JS does not work, not
What can Slip. js do? Slip. js allows your mobile website to scroll and rotate mobile images like the native mobile phone software. if you are interested in js, refer to the Slip. js, y
Solution to js failure loss after jquery mobile page Jump, jquerymobile
When ajaxscripts are used, the css and js of B .html are invalid after a.html# B .to B .html.
Method:
Place the css and js used in browser B .html IN THE
Principle:
When jqm's ajaxworkflow is used, only the content in
When you use jquery
JS determines whether the mobile phone or pad access content is used. If you are interested in using JS to determine whether the mobile phone or pad access is used, go to the Code: lt; scripttype quot; textjavascript quot; gt; ** smartphone browser version: ** varbrowser {versions: function () {varunavigat
In fact, there are many ways of mobile phone and PC, we often encounter such demand in the construction of responsive design and responsive website. Let's talk about the requirements we encountered in the project:Different JS customer service codes are loaded on the mobile and PC side (note: The different JS files are
We all like the "pull-down refresh" function on mobile devices. What if this effect is applied to traditional web pages? Well, Hook. js can be implemented. They used this innovation in mobile phones and tablets. As long as they scroll down and then bounce back to the top, the page will automatically refresh.Articles you may be interested in
Use Toolbar.
As we all know, the Click event on the phone will have a delay of 300ms problem. However, we need to cancel this delay when we do some small game on the mobile phone side.The first step: Prohibit page zoom
Meta name="viewport" content= "width=device-width user-scalable= ' no '">
This piece of content can solve some of the problems of mobile phonesStep Two: fastclick.jsFastclick is a lightwei
This article is an example of the micro-letter Js-sdk preview Image interface and from the photo or phone album Select interface usage. Share to everyone for your reference, specific as follows:
In the current version of JS-SDK 1.0, the preview image provides 2 interfaces, and the definition of the interface refers to the official document
1. Preview the network picture HTTP link
2. Preview the local pic
This article mainly introduces how to determine the different event execution methods of mobile phones and PCs by js, so that you can determine whether the mobile phone or pc end can select the corresponding event execution function, it is a very practical technique. If you need it, you can refer to the examples in this article to describe how
This article is also a collection of a large number of JS verification of mobile phone number code, all from the network, if you are not very understanding, you can directly take us now mobile phone number verification code to use OH.
JS Verify mobile phone number
Lory is a simple JS slideshow plugin that supports mobile touch devices. The slide plug-in can be called by Pure JS, or it can be used as a jquery plug-in. The transition animation for this slide has hardware acceleration and can be customized to use the easing effect.Some of the features of this slide are listed below:
Support for
Improve mobile Angular. js applications with Trigger. io
Improve mobile Angular. js applications with Trigger. io
Trigger. io Forge allows us to develop local mobile applications using the latest and best Web technologies.This article demonstrates how to develop a simple Ang
Demand:Implemented in different mobile terminal devices, the UI design draft of the proportional adaptation.Scheme:Layout and typesetting are used REM to do units, and then different width of the screen, JS Dynamic Computing root node font-size.Assuming that the design is 750px wide, writing CSS for easy calculation, the root node font-size assumed to be 100px, the device width is 7.5rem. Any PX value that
58 local storage-type XSS (loading JS with 25 characters) + posts with any mobile phone number deleted and repaired
Without saying this, I spent all my energy on the primary domain. In addition, I would like to thank parsec for your thoughts and short domain names.It's too late to dig for a vulnerability. If you don't have the energy to write details, just write it. Forget to forgive me! Look at this effort
We do the site, the user experience that is very important, such as 12306 Rob tickets need to fill in the ID card, if not the space, dense to give me a very depressing feeling, and also not easy to check whether the information is filled out correctly, so I wrote a use JS implementation of the completion of the social security number, mobile phone number, The effect of automatic space for information such a
} $/
---------------------------------------------
JS Regular Expression verification indicates whether the input is a mobile phone number or phone number
First give the original link: http://www.cnblogs.com/cxy521/archive/2008/06/05/1214624.html
Verify the regular expression of the mobile phone number:/^(?:13\ D|15[89])-?\ D {5} (\ D {3}|\*{3}) $/
Regula
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.