zoukankan      html  css  js  c++  java
  • 弹窗式页面

    一、弹窗js导入(主页面)

    <!--弹出框-->
    <script src="~/media/layer/layer.js"></script>
    <!--弹出框-->

    二、html代码(主页面)

    <input type="text"  id="E_id"  onclick="ChooseBE()" />

    三、js代码(主页面)

    function ChooseBE() {
    layer.open({
    type: 2,
    area: ['700px', '450px'],
    fixed: false, //不固定
    maxmin: true,
    content: '/Dispatching/ChooseBE'
    });
    }

    四、js代码(弹窗页面)

    <script type="text/javascript">

    $(function () {

    $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');

    $('.tree li.parent_li > span').on('click', function (e) {

    var children = $(this).parent('li.parent_li').find(' > ul > li');

    if (children.is(":visible")) {

    children.hide('fast');

    $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');

    } else {

    children.show('fast');

    $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');

    }

    e.stopPropagation();

    });

    });

    </script>

    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引

    parent.$('#E_id').val(row.E_id);//将得到的数据放到主页面所对应id的输入框中

    parent.layer.close(index);//当前窗口关闭

  • 相关阅读:
    HTML5结构
    HTML5新增的非主体元素header元素、footer元素、hgroup元素、adress元素
    CF GYM 100703G Game of numbers
    CF GYM 100703I Endeavor for perfection
    CF GYM 100703K Word order
    CF GYM 100703L Many questions
    CF GYM 100703M It's complicate
    HDU 5313 Bipartite Graph
    CF 560e Gerald and Giant Chess
    POJ 2479 Maximum sum
  • 原文地址:https://www.cnblogs.com/zchbiji/p/9041939.html
Copyright © 2011-2022 走看看