• λ我爱Aspx >> C#.Net >> 微软Asp.net Ajax 1.0的AutoComplete控件的几处修正和增强
  • 微软Asp.net Ajax 1.0的AutoComplete控件的几处修正和增强

  • :aspxer  Դ:5iaspx  :2007-7-30 6:11:51  ؼ:.net,asp.net,ajax,asp,com,微软
  • this._popupBehavior = null;

    }

    第二个问题,要将document.body.appendChild(this._completionListElement);这一行修改为 element.parentNode.appendChild(this._completionListElement);

    第三个问题,需要在_onTimerTick方法中,为if (text.trim().length < this._minimumPrefixLength) 这个判断增加一个条件,变成:if (text.trim().length < this._minimumPrefixLength || text.trim().length > 10) ,这就使得,当用户的输入超过10个字符时,就不必向服务端调用读取匹配值的方法了。

    第四个问题,要调整自动完成列表的样式,可以直接修改initializeCompletionList方法中的以下代码:

    completionListStyle.backgroundColor = this._textBackground;

    completionListStyle.color = this._textColor;

    completionListStyle.border = 'solid 1px buttonshadow';

    completionListStyle.cursor = 'default';

    completionListStyle.unselectable = 'unselectable';

    completionListStyle.overflow = 'hidden';

    ,或者删除这几行,并添加:element.className = "completionList";然后在页面上添加样式类“completionList”的定义即可;

    Ҷƪл˵?
  • һƪ开发跨浏览器JavaScript时要注意的问题
    һƪ绑定Enum到ASP.NET数据绑定控件的完美解决方案