zoukankan      html  css  js  c++  java
  • iframe相关笔记

       /// 合同到期日期弹窗
        function popWin1(url, title, width, height) {
            if (title == "") {
                title = "详情";
            }
    
            if (width == null || width == undefined || width == "") {
                width = 900;
            }
    
            if (height == null || height == undefined || height == "") {
                height = 600;
            }
    
            artDialog.open(url,
           {
               title: title,
                width,
               height: height,
               lock: true,
               opacity: 0.5,
               ok: function() {
                   var n = $("iframe")[0].contentWindow.$("#mth").text();//获取ifram中参数值
    
                   $.ajax({
                       type: "POST",
                       url: "@Url.Content("~/TchContract/SetRemind")", 
                       data: "value=" + n,
                       success: function (data) {
    
                           popAlert("保存成功!", function () {
                               window.location = "@Url.Content("~/TchContract/Index")";
                    }, "success");
                          
                       }
                   });
               }
    
           });
    
    
    
        }







    //在主页面操作ifram中内容
      //替换提交
        function SubmitChange() {
    
            var OldquestinId = $("iframe")[0].contentWindow.$("#OldquestinId").val();
            var newquestinId = $("iframe")[0].contentWindow.$("#newquestinId").val();
            var questionType = $("iframe")[0].contentWindow.$("#questionType").val();
    
            if (newquestinId == -1) {
                $("iframe")[0].contentWindow.$("#tips").css('display', 'block');
                return false;
            }
            var datas = { "oldQuestionId": OldquestinId, "newQuestionId": newquestinId, "questionType": questionType };
            $.ajax({
                type: "post",
                async: false,
                url: "@Url.Action("Replace", "AssessSuper")",
                data: JSON.stringify(datas),
                dataType: "json",
                contentType: "application/json",
                success: function (data) {
                    if (data.ResultType == 8 && !!data.ResultMessage) {
                        window.parent.location.href = "/user/logon?loginTip=" + data.ResultMessage;
                        return;
                    } else if (typeof (data) == "object" && data.ResultType == 9) {
                        window.parent.location.href = "/SuperAdmin/CourseLoading/Index";
                        return;
                    } else {
                        location.reload();
                    }
                }
            });
            return true;
        }
    
    
    
     
  • 相关阅读:
    Hdu 3564 Another LIS 线段树+LIS
    利用ESLINT进行js 语法检查,以及局部安装时遇到的一些坑
    操作系统杂谈
    算法杂谈
    前端杂谈
    操作系统复习
    vue之——从彩笔的进步之路
    一丢丢学习之webpack4 + Vue单文件组件的应用
    计蒜客 2017复赛 百度地图导航
    electron打包之真的恶心
  • 原文地址:https://www.cnblogs.com/zyq-dan/p/8251697.html
Copyright © 2011-2022 走看看