zoukankan      html  css  js  c++  java
  • 页面弹框(后台加载页面信息)

    js代码

    //抄送个人
    OperationBar.prototype.copySomeone = function(){
    copySomeoneDialog("抄送个人",FRAMEWORK_BASE_PATH+'/document/operation/csSomeone?single=false','500px','390px','iframe');//action路径
    }

    function copySomeoneDialog(title,content,width,height,cssName){
    var temp_float=new String;
    temp_float="<div id='floatBoxBgCs'></div>";
    temp_float+="<div id='floatBoxCs' class='floatBox'>";
    temp_float+="<div class='titlecs'><h4></h4><span>关闭</span></div>";
    temp_float+="<div class='contentcs'></div>";
    temp_float+="</div>";
    $("body").append(temp_float);

    $("#floatBoxCs .titlecs span").click(function(){
    $("#floatBoxBgCs").remove();
    $("#floatBoxCs").remove();
    });

    $("#floatBoxCs .titlecs h4").html(title);
    $("#floatBoxCs .contentcs").html("<iframe src='"+content+"' height='"+height+"px' width='100%' scrolling='auto' frameborder='0' marginheight='0' marginwidth='0'></iframe>");

    $("#floatBoxBgCs").css({display:"block",height:$(document).height(),});
    $("#floatBoxCs").css({display:"block",left:(($(document).width())/2-(parseInt(width)/2))+"px",top:($(document).scrollTop()+80)+"px",width,});
    }

    css代码

    /**抄送个人浮框样式**/
    #floatBoxBgCs{100%;height:100%;background:#000;filter:alpha(opacity=50);opacity:0.0;position:absolute;top:0;left:0;z-index: 19;}
    .floatBox{border:#deefff 1px solid;300px;position:absolute;top:50px;left:40%;z-index: 20;background-color:#fff}
    .floatBox .titlecs{height:33px;padding:7px 10px 0;background:#deefff;color:#000;100%}
    .floatBox .titlecs h4{float:left;padding:0;margin:0;font-size:14px;line-height:19px;}
    .floatBox .titlecs span{float:right;cursor:pointer;padding-top: 2px;}
    .floatBox .contentcs{background:#fff;}

  • 相关阅读:
    记一次对网站的SEO优化改造
    pc端页面添加响应式布局
    linux开启coredump
    vue中鼠标事件
    垂直居中的几种方法
    最准确的身份证号码正则验证
    将数组[NaN ,1,21,32,NaN,41,5]里面的NaN成员剔除(复用underscore.js的filter方法)
    项目中使用Mockjs模拟数据
    研究生学习与生活(2019)
    研究生学习与生活(九)
  • 原文地址:https://www.cnblogs.com/husfsh-16300/p/7209461.html
Copyright © 2011-2022 走看看