手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >jqeury-easyui-layout问题解决方法
jqeury-easyui-layout问题解决方法
摘要:今天在用easyui做布局时,碰到了一个疑惑的问题。问题:当把class=“easyui-layout”写在一个独立的div中时,layou...

今天在用easyui做布局时,碰到了一个疑惑的问题。

问题:当把class=“easyui-layout”写在一个独立的div中时,layout的样式无法显示,也不报错。

例如:

复制代码 代码如下:

<span><body >

<div>

<div data-options="region:'north',title:'North Title',split:true">

</div>

<div data-options="region:'south',title:'South Title',split:true">

</div>

<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true">

</div>

<div data-options="region:'west',title:'West',split:true">

</div>

<div data-options="region:'center',title:'center title'" href="CenterPage.html">

</div>

</div>

</body></span>

显示:

1

解决:把class=“easyui-layout”写在body中时,问题就迎刃而解了。且region属性不能被其他无关的div所包含。

代码:

复制代码 代码如下:

<span><body>

<div data-options="region:'north',title:'North Title',split:true">

</div>

<div data-options="region:'south',title:'South Title',split:true">

</div>

<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true">

</div>

<div data-options="region:'west',title:'West',split:true">

</div>

<div data-options="region:'center',title:'center title'" href="CenterPage.html">

</div>

</body></span>

2

一直在想这是为什么?

【jqeury-easyui-layout问题解决方法】相关文章:

Javascript实现飞动广告效果的方法

javascript元素动态创建实现方法

jquery预加载图片的方法

jQuery实现自动滚动到页面顶端的方法

jquery实现点击label的同时触发文本框点击事件的方法

js比较日期大小的方法

jQuery实现给页面换肤的方法

js实现点击链接后延迟3秒再跳转的方法

iscroll.js的上拉下拉刷新时无法回弹的解决方法

Javascript监视变量变化的方法

精品推荐
分类导航