Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道这种形式的事件委托:
anItem = Y.one('ul#id'); anItem.delegate('click', aFunction, 'selector');
使用什么事件将样式应用于动态创建的每个 li?我将对每个 li/new li 运行 addClass()。
我试过这样:
anItem.delegate('onchange', aFunction, 'selector');
我也尝试过“更改”事件。但没有成功。
选择了哪些元素'selector'?该onchange事件仅对INPUT,SELECT和TEXTAREA元素有效。请参阅规范。
'selector'
onchange
INPUT
SELECT
TEXTAREA