dynamically add responsibilities to these objects. Concretecomponent: Defines an object that can dynamically add responsibilities to this object. Decorator: Maintains a pointer to a Component object, defines an interface that is consistent with the component interface, or implements the Component object directly.
Collaboration Relationship: Decorator sends requests from clients to the decorated concretecomponent to perform additional actions before and after sending the request.
Implementatio
.test (mobile) my=true;
if (reg1.test (mobile)) MY=TRUE;N bsp;
if (reg2.test (mobile)) my=true;
if (reg3.test (mobile)) My=true;
if (reg4.test (mobile) my=true;
if (reg5.test (mobile)) my=true;
if (reg6.test (mob ile) my=true;
if (!my) {
//alert (' Sorry, you have entered a phone or PHS number with errors. ');
return false;
}
return true;
}
}
Verify Three
var cellphone=/^ (((1[0-9]{1}[0-9]{1})
The example in this article describes the way JavaScript parses JSON. Share to everyone for your reference. The specific methods are as follows:
Download the JSON libraryHttp://www.json.org/json-zh.html himself for JavaScript.Or just go down there.Https://github.com/douglascrockford/JSON-jsPHP generates JSON format
Working with pages
Copy Code code as follows:
Alert (data.tojsonstring ());
If return false indicates no data
JS Code:
Copy Code code as follows:
Original question: You is a political prisoner in jail. Things is looking grim, but fortunately, your jailmate have come up with an escape plan. He has found a-a-both of you-get out of the cell and run through the city to the train station, where you'll le Ave the country. Your friend would escape first and run along the streets of the city to the train station. He'll then call the there on your cellphone (which somebody smuggled in to you inside a c
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service