有时,我们希望在程序运行的时候,可以动态的创建元素。可以这样来实现:

Assitant setup 方法中调用 Element insert 方法,如下例所示:


MyAssistant.prototype.setup = function()
{
    ...
    
var allElem = this.controller.select("*");
    
// add the spinner before the first element
    allElem[0].insert({before : '<div x-mojo-element="Spinner" >
    });
    ...
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-09-17
  • 2022-12-23
  • 2022-03-15
  • 2022-02-09
猜你喜欢
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-02-28
  • 2021-11-21
相关资源
相似解决方案