LinkList.prototype.update = function (position,newData) {
if (position < 0 || position >= this.length) return false;
//获取对应的data
var current = this.head;
var index = 0;
while (index++ < position) {
current = current.next;
}
//将数据替换
current.data=newData;
return true
};