zoukankan      html  css  js  c++  java
  • 如何动态控制弹出窗体的大小

    目前需要在asp.net中实现一个这样的功能,跳出一个子窗体(模式)让客户选择内容,然后返回这个值
    功能需要在IE5.5 和netscape7 上都完成
    这个目前我做到了,代码在最后大家可以参考下
    但弹出页面是和db相关,需要根据内容来调整窗体的大小,可是用
    showModalDialog 打开的窗体就是没有办法在页面加载后调整,
    那个大侠给支个照,我这里先谢谢了

    var winModalWindow;

    function selcolor(val)
    {
       var info;
      if (val == "1")  info = document.forms[0].txtColorB.value;
      if (val == "2")  info = document.forms[0].txtColorA.value;

       if (navigator.appName != "Netscape")
       {
     // ret = showModalDialog('earring_custom.aspx?mode='+val+"&info="+info,parent,'dialogWidth:520px;dialogHeight:475px;center:yes;help:no;resizable:no;status:no');
      ret = showModalDialog('earring_custom.aspx?mode='+val+"&info="+info,parent,'dialogWidth:520px;dialogHeight:475px;center:yes;help:no;resizable:yes;status:no');
      }
      else
      {
      winModalWindow = val;
      window.open ('earring_custom.aspx?mode='+val+"&info="+info, 'ModalChild', 'dependent=yes,height=475, width=520, toolbar=no, menubar=no, scrollbars=no, resizable:yes,location=no, status=no');
      }

      if (ret==null) ret="N/A";
      if (val == "1")  document.forms[0].txtColorA.value=ret;
      if (val == "2")  document.forms[0].txtColorB.value=ret;
    }

    function nsSetValue()
    {
     
      if (winModalWindow==null) ret="N/A";
      if (winModalWindow == "1")
      document.forms[0].txtColorA.value  = document.forms[0].hidetext.value;
      if (winModalWindow == "2")
      document.forms[0].txtColorB.value  = document.forms[0].hidetext.value;

    }

  • 相关阅读:
    使用 Dockerfile 自定义 Nginx 镜像
    Windows下Rancher复制Pod内文件到本地
    SSL基础知识及Nginx/Tomcat配置SSL
    linux内核源码
    strace:跟踪进程的系统调用 、ltrace:跟踪进程调用库函数,runlevel & init & service
    C10K,C10M问题
    操作系统
    深入理解GOT表和PLT表
    为什么 List<Struct> 在 C# 中的分配速度比 List<Class> 快 15 倍
    如何计算时间复杂度
  • 原文地址:https://www.cnblogs.com/myzerg/p/170908.html
Copyright © 2011-2022 走看看