1,trim (): Remove the space between the left and right sides of the string, in VBScript can easily use trim, LTrim or RTrim, but in JS there is no 3 built-in methods, you need to manually write.
<script language= "JavaScript" >
String.prototype.trim=function () {return this.replace (/(^\s*) | ( \s*$)/g, "");}
String.prototype.ltrim=function () {return This.replace (/(^\s*)/g, ""); }
string.prototype.rtrim=function () {return This.replace (/(\s*$)/g, ""); }
</script>
2,search (): Retrieves the substring specified in the string, or checks for substrings that match the regular expression.
Stringobject.search (regexp); The starting position of the first substring in stringobject that matches the regexp. Note: If no matching substrings are found, 1 is returned.
The 3,random () method can return a random number between 0 and 1.
JavaScript Common Method Records