[YUI的AutoComplete] “forceSelection”选项可以阻止用户输入无效的值

设置属性 myAutoComp.forceSelection = true;可以使用户无法输入无效的值–如果输入了非侯选值,输入框会被清空。

这个属性可以和  selectionEnforceEvent  一起使用。 在用户输入无效值而被清空后, selectionEnforceEvent  会被触发。

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.