json数组的增删改操作

1、数组的创建

var arrayObj = new Array(); //创建一个数组  
var arrayObj = new Array(\[size\]); //创建一个数组并指定长度,注意不是上限,是长度  
var arrayObj = new Array(\[element0\[, element1\[, ...\[, elementN\]\]\]\]); 创建一个数组并赋值  

textarea自动伸缩框

在做表单配置时,项目遇到需要写一个回复月工作内容的页面,设计师给的初始界面就是一个只有一行的框。后台要求,必须用textarea,然后当时就想这个交互该怎么实现比较好,然后想起了新浪微博的做法:点击评论,默认显示一行,当输入的文字超过一行或者输入Enter时,输入框的高度会随着改变,直到输入完毕。顿时觉得这个细节做得挺不错的,可以效仿下。

<textarea name="textarea" id="textarea" onpropertychange="this.style.height = this.scrollHeight + 'px';"   
oninput="this.style.height='auto';this.style.height = this.scrollHeight + 'px'" style="overflow-Y: hidden;">  
</textarea>  

实际效果测试:

拓展延伸

1、height、clientHeight、scrollHeight、offsetHeight的区别
2、textarea其他两种方式实现高度自适应

Something About JQueryUi

1、需要对IE6支持的话,只能使用jQuery UI 1.9.2,目前官网定制页只有1.9.2会支持IE6,

jQuery UI Upgrade Guide(升级指南)中指出

jQuery UI 1.10 Upgrade Guide

Removed support for IE6

IE6 usage has dropped to a low enough point that jQuery UI no longer finds it necessary to support. As of 1.10.0, some portions of jQuery UI may not work properly in IE6. If you need to continue to support IE6, use the latest jQuery UI 1.9 release.
jQuery UI 1.11 Upgrade Guide

Discontinued IE7 Support

As of this release we are no longer accepting bug reports for IE7 issues. We have also removed IE7 from our testing infrastructure. The IE7 workarounds are still present in the code, but we will remove them for jQuery UI 1.12.

2、部分组件只在服务端生效,目前用过的服务端生效的有:resizable、slider、