jQuery MiniUI

 找回密码
 立即注册
查看: 1811|回复: 1
打印 上一主题 下一主题

怎么样用JS控制DIV的大小 [复制链接]

Rank: 6Rank: 6

跳转到指定楼层
楼主
发表于 2018-7-6 12:00:23 |只看该作者 |倒序浏览
<div id="dfn_view_pxks_ktzj_detail" class="mini-datagrid" style="width: 100%; height: 100%;"
                                        visible="true" allowalternating="false" pagesize="10" showpager="true" allowcellselect="true"
                                        multiselect="true" idfield="questionid" sortfield="questioncontent" sortorder="desc">
                                        <div property="columns">
                                            <div type="checkcolumn">
                                            </div>
                                            <div type="indexcolumn">
                                            </div>
                                            <div field="questioncontent" header="试题内容" allowsort="true" width="250px">
                                                <input property="editor" class="mini-textbox" style="width: 100%;" />
                                            </div>
                                            <div field="questiontype" header="类型" allowsort="true" width="50px">
                                                <input property="editor" class="mini-textbox" style="width: 100%;" />
                                            </div>
                                            <div field="answer" header="答案" allowsort="true" width="50px">
                                                <input property="editor" class="mini-textbox" style="width: 100%;" />
                                            </div>
                                        </div>
                                    </div>
                                    <div id="Div1" class="mini-datagrid" allowcellwrap="false" style="width: 100%; height: 35%;"
                                        allowresize="true" allowcelledit="false" multiselect="true" showpager="false"
                                        idfield="questionid" autoload="false" url="/Form/GridPageLoadEx" sortfield="questioncontent">
                                        <div property="columns">
                                            <div type="indexcolumn" width="20px">
                                            </div>
                                            <div field="questioncontent" header="试题内容" allowsort="true" width="250px">
                                                <input property="editor" class="mini-textbox" style="width: 100%;" />
                                            </div>
                                        </div>
                                    </div>



      var zy = function() {
            if (document.getElementById("dfn_view_pxks_ktzj_detail").style.height == "100%") {
                document.getElementById("dfn_view_pxks_ktzj_detail").style.height = "65%";

                mini.get("Div1").setData([]);
                jq = 1
            } else {
                jq = 0;
                document.getElementById("dfn_view_pxks_ktzj_detail").style.height = "100%"

            }

        }



我觉得没什么问题
但是
触发JS的时候,下面的分页栏不见了,被挡住了呢。
请问是什么原因。我该怎样修改代码呢。

附件: 你需要登录才可以下载或查看附件。没有帐号?立即注册

Rank: 8Rank: 8

沙发
发表于 2018-7-6 13:51:41 |只看该作者
MiniUI控件,请使用MiniUI的方法控制
mini.get(id).setHeight(height)

Archiver|普加软件

GMT+8, 2024-9-20 05:28 , Processed in 1.034526 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部