1.XAML 接触WPF的第一眼就是XAML---XAML是用来描绘界面的.其实不然! "Actually, XAML has nothing to do with UI. It's merely a declarative way of constructing objects and setting their properties.” XAML和UI一点关系也没有,它仅仅是一种以声明方式来构建对象,设置对象属性的一种方式而已,和code behind file作用差不多.XAML这种声明方
var test=[1,2,3,4,5,6,7]; var arr=test; arr.splice(2,1); alert(test);//1,2,4,5,6,7 JS数组实质上是对象.因此,上面的源代码最后打印出的是1,2,3,4,5,6.这是因为将test赋值给arr实际上是将数组的引用赋值给arr,所以操作arr也同时会改变源数组. 要实现数组克隆,可以下方法:Array.prototype.clone=function(){ return this.slice(0);