zoukankan      html  css  js  c++  java
  • test

    <script>
    	// var c=[2,4,3,5,2,2,2],
    
    	// 	a = {},
    
    	// 	i = 0;
    
    	// 	for(;i<c.length;i++){
    
    	// 		a[c[i]] = 1
    	// 	}
    
    	// 	c=[];
    
    	// 	for(var g in a){
    
    	// 		c.push(g-0);
    	// 	}
    
    
    
    	// 	console.log(c); //删选数组中有无重复的数字
    
    
    	// var pattern1 = /s/;  //空格
    	// console.log(pattern1.test("njkhjkjk ")); //检查英文字是否有空格
    
    
    	 
    	
    
    
    
    	
    
    	
    
    	
    
    
    	// var nums = "132153132135",
    
    	// 	ary = [];
    
    	// 	nums.replace(/d{1,3}/g,function(num){ //d为正则,每三个分一组推入数组
    
    	// 			ary.push(num);
    
    
    	// 	});
    
             console.log(ary);
    
    	// 	console.log(Math.max.apply(null,ary));把数组中最大的那个打印出来
    
    
    
    
    
    // var o = new Object();
    // 	o.s=1;
    // 	// console.log(o.constructor);
    // 	if("toString" in o){
    
    // 		console.log("youshuxing");
    
    // 	}
    
    
    	// var ele = document.getElementById("test");
    
    	// if("placeholder" in ele){
    
    	// 	alert("支持");
    
    	// }else{
    
    	// 		alert("bu支持");
    
    	// }
    	
    // var name = "xu",
    
    // 	preson ={
    
    // 		name:"ren",
    
    // 		say:function(){
    
    // 			// var that = this;
    
    // 			// console.log(this.name);
    
    // 			var a =function(){
    
    // 					console.log(this.name);
    
    // 			};
    
    
    // 			a.call(preson);
    // 		}
    
    
    // 	};
    
    // preson.say();
    
    
    // function person(name,age,job){
    
    // 	this.name = name;
    // 	this.age = age;
    // 	this.job = job;
    
    // }
    
    
    // person.prototype.sayname=function(){
    
    // 	return this.name;
    // }
    
    // console.log(person.prototype.constructor);
    
    
    // var ren = new person("ren",22,"teacher");
    // var xu = new person("xu",18,"doctor");
    
    // console.log(ren.sayname());
    
    // console.log(xu.sayname());
    // ren.name = "lin";
    
    // console.log(ren.sayname());
    
    // console.log(ren.__proto__);
    // console.log(person.prototype.constructor);
    // console.log(person.prototype.isPrototypeOf(ren));
    
    // console.log(Object.getPrototypeOf(ren) == person.prototype);
    // console.log(Object.getPrototypeOf(ren).sayname);
    
    // console.log(Object.keys(person.prototype));
    // console.log(Object.getOwnPropertyNames({}));
    
    // function Person(){
    
    // }
    
    
    
    // Person.prototype = {
    
    // 	constructor:Person,
    // 	name : "xu"
    // }
    
    // var friend = new Person();
    
    // console.log(friend.name);
    
    
    Number.prototype.add=function(num){
    
     	return this + num;
     }
    
     console.log((2).add(3));
    
    
    String.prototype.Ltrim=function(){
    
     	return this.replace(/s/g,"");
     }
    
     console.log("1 2 3".Ltrim());
    
  • 相关阅读:
    在Flex or AIR中检测你的网络连接是否正常
    设置Adobe Air应用程序属性
    airMeeting
    用Adobe Flex3开发AIR应用程序–入门指南
    Adobe Flash Player 9.0.124 的安全策略更改
    分发,安装和运行AIR应用程序
    永远置于顶层(always on top)的AIR应用
    翻译:SWFObject 2.0官方文档
    C#温故而知新学习系列之.NET框架高级特性—概述.NET框架中的反射(一)
    C#温故而知新学习系列之字符串处理—指定字符串的显示格式(一)
  • 原文地址:https://www.cnblogs.com/xupeiyu/p/4605234.html
Copyright © 2011-2022 走看看