Javascript: simple and efficient collection of Byshawl. qiu_javascript Functions
Source: Internet
Author: User
Byshawl. qiu, a simple and efficient javascript function for judging data types:
Some time ago, when I got familiar with ASP VBScript, I switched to Javascript/Jscript, mainly to Jscript.
However, there is basically no difference between the two. The only difference is that Jscript has no client concept.
At the beginning, I found that many of the practical functions Js in VBS were not available, such as formatNumber, isArray, and isDate.
The date object is also very strange, and cannot be directly added or subtracted. set ***...
However, when you have mastered Javascript/Jscript to a certain extent, you will find that it is N times better than VBS. What is strong is that it has free syntax, and VBS does not have a certain function, in JavaScript, you only need to create prototype or a judgment function to implement the same function. the other obvious difference is that regular expressions are available everywhere.
Ah, a bunch of nonsense. Come on.
Directory:
1. Determine whether it is an array type.
2. Determine whether the string type is used.
3. Determine whether the data type is Numeric.
4. Determine if it is of the date type
5. determine whether it is a function.
6. Determine whether the object is used
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