废话不说,直接上代码:

$('#Teacherwin_details').window({
                    title: '查看教职工信息',
                    width: 800,
                    height: 520,
                    top: ($(window).height() - 720) * 0.5,
                    left: ($(window).width() - 800) * 0.5,
                    modal: true,
                    onResize: function (width,height) {
                        var stab = $('#Teacher_tab').tabs('getSelected');
                        var actWidth = width; if (width > 38) { actWidth = width - 38; }
                        stab.width(actWidth);
                    }
                }).window('open');
                $('#Teacherfm_details').form('load', row);
                $('#Teacher_tab').tabs('select', 0);

 注意:代码中的38是这样得到的:在默认情况下,窗体的宽度为800,而监视stab时发现stab的宽度为762,因此,stab与窗体之间有38个像素的间隙。写代码时,也可以直接用变量代替38,使代码更直观,更优雅。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
猜你喜欢
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案