|
发表于 2017-8-7 16:15:40
|
显示全部楼层
本地这样写没问题
你获取的cgTitle 应该是jquery 对象 而不是 标准的dom对象!!
- Model.prototype.button2Click = function(event){
- debugger;
- var cgTitle=$(this.getElementByXid("controlGroupStyle")).children().eq(0)[0];
- // cgTitle.css("font-size", "20px");
- var buttonDel = new Button({
- label : '删除',
- parentNode : cgTitle,
- xid:"buttonDel",
- "class":"btn btn-link"
- });
-
- var d=this.getElementByXid('controlGroupStyle');
- buttonDel.on("onClick", function(event) {
- justep.Util.confirm("你确定要删除吗?", function() {
- d.remove();
- }, function() {
-
- });
- }, this);
- };
复制代码 |
|