版权声明:本文为博主原创文章,未经博主允许不得转载。

1、layout以html标签方式建立的

  1. <div id="content" region="center" border="false" class="easyui-layout">
  2. <div id="divPage1"
  3. data-options="region:'west'"
  4. style="width: 150px;"></div>
  5. <div id="divPage2"
  6. data-options="region:'center',href:'${basePath}/userManage_main.jspx'"></div>
  7. </div>

这样,如果我想重新修改 div id="divPage1"这个layout的href属性,应该怎么实行?

实现方法:

  1. $("#divPage1").panel({region:'west',href:'${basePath}/userManage_left.jspx?width='+width});
  2. $("#divPage1").panel('refresh');

必须执行panel的‘refresh’方法才会生效,因此这个‘userManage_left.jspx’页面会被执行2次。目前我的解决办法是使用js脚本建立的方式来解决。

2、用js脚本方式建立的

先建立一个div标签,用于生成layout。

  1. <div id="content" />

js脚本创建

    1. $('#content').layout('add',{
    2. region: 'west',
    3. width: 180,
    4. title: 'West Title',
    5. split: true,
    6. href:'${basePath}/userManage_left.jspx?width='+width,
    7. tools: [{
    8. iconCls:'icon-add',
    9. handler:function(){alert('add')}
    10. },{
    11. iconCls:'icon-remove',
    12. handler:function(){alert('remove')}
    13. }]
    14. });
    15. $('#content').layout('add',{
    16. region: 'center',
    17. width: 580,
    18. title: 'center Title',
    19. split: true,
    20. href:'${basePath}/userManage_main.jspx',
    21. tools: [{
    22. iconCls:'icon-add',
    23. handler:function(){alert('add')}
    24. },{
    25. iconCls:'icon-remove',
    26. handler:function(){alert('remove')}
    27. }]
    28. });

最新文章

  1. Thinking in Unity3D:渲染管线中的Rendering Path
  2. TransmitFile函数的简单使用
  3. resin启动报错:guava-15.0.jar!/META-INF/beans.xml:5: &lt;beans xmlns=&quot;http://xmlns.jcp.org/xml/ns/javaee&quot;&gt; is an unexpected top-level tag. 异常
  4. 小技巧,关于OC打印指针地址和arc下的retaincount
  5. Cpdetector编码识别
  6. Socket异步通信学习三
  7. yii2图片验证码
  8. 调皮的QQ音乐API:修复无法获取歌单
  9. 办公楼[POI2007]
  10. geotrellis使用(三十五)Cesium加载geotrellis TMS瓦片
  11. Windows控制台下绘制简单图形
  12. Mac 下 查看 使用某端口的进程和关闭该进程的命令
  13. SIM7600C读写本机号码
  14. linux下的crontab安装及简单使用
  15. Android Studio 调用夜神模拟器
  16. Java 中的 int 型转为 long 型
  17. ThreadLocal的学习
  18. Django _VIEW视图_源码分析
  19. Json对象和字符串互相转换 数据拼接 JSON使用方式
  20. RN九宫格

热门文章

  1. vue实现数据驱动视图原理
  2. http://wsj356428476.iteye.com/blog/1655032
  3. Strategy Pattern(策略模式)
  4. 将EC2的Sql Server 计划任务的方式备份到s3上
  5. 再说rocketmq消息存储
  6. vue组件属性中字符串如何拼接变量?
  7. TestNG 八 并发测试
  8. liunx系统安装jdk的方法
  9. JMeter 六:Listener
  10. Codeforces Round #177 (Div. 2) 题解