您如何将此代码从 yui2 迁移到 yui3?
Yui2:
this._suspensionPlanPanel = document.getElementById("rn_"+this.instanceID+"_SuspensionPlanPanel");
var td_list = YAHOO.util.Dom.getElementsByClassName("rn_SuspensionPlan_Target","td",this._suspensionPlanPanel);
this._suspensionPlanTargetTemplate = td_list[0];
我试过把它变成这个(Yui3):
this._suspensionPlanPanel = this.Y.one(this.baseSelector+"_SuspensionPlanPanel");
var td_list = this.Y.all(this._suspensionPlanPanel.get('id') + ' td.rn_SuspensionPlan_Target');
this._suspensionPlanTargetTemplate = td_list[0];
但它总是以未定义的形式出现。Console.loging td_list 给了我消息:
undefined: not bound to any nodes { _query="rn_SuspensionForm_12_Su....rn_SuspensionPlan_Time", _nodes=[0], invoke=function(), more...}
我在这里想念什么?