申倩倩 2009-06-28 22:56
浏览 354
已采纳

window.title赋值问题

window第一次创建的时候,title属性正常
但是第二次show(),title显示的还是以前的
我用js调试看了下,赋值已经成功,但是window的标题还是第一次创建的那个,代码如下
希望高手帮我看看怎么解决,非常感谢。

var main_win_SelectedOrderDetail = null;
function OpenWinSelectStyle(tt) {
if (!main_win_SelectedOrderDetail) {
main_win_SelectedOrderDetail = new Ext.Window({
title: tt,
width: 860,
height: 470,
layout: "fit",
modal: true,
plain: true,
border: false,
closable: false,
resizable: false,
html: 'test',
buttons: [
{ text: '确定' }, { text: "取消", handler: CloseWinSelectStyle }
]
});
}
main_win_SelectedOrderDetail.title = tt;
main_win_SelectedOrderDetail.doLayout(true);
main_win_SelectedOrderDetail.show();
}
function CloseWinSelectStyle() { main_win_SelectedOrderDetail.hide(); }

  • 写回答

2条回答 默认 最新

  • zhoujuan520 2009-06-29 00:23
    关注

    setTitle( String title, [String iconCls] ) : void
    Sets the title text for the panel and optionally the icon class. In order to be able to set the title, a header eleme...

    Sets the title text for the panel and optionally the icon class.

    In order to be able to set the title, a header element must have been created for the Panel. This is triggered either by configuring the Panel with a non-blank title, or configuring it with header: true.
    Parameters:

    * title : String
      The title text to set
    * iconCls : String
      (optional) iconCls A user-defined CSS class that provides the icon image for this panel
    

    Returns:

    * void
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器