• 常用Javascript


    1>  打开窗口

    一般,
    function showWindow(iWidth,iHeight,ctlID)
    {
        
    var features = "Width=" + iWidth + ",";
        features 
    += "Height=" + iHeight + ",";
        features 
    += "left=400,top=300,toolbar=no,help=no,menubar=no,status=no,scroll=no,location=no";
        window.open(
    "../Resource/WebControl/DateTimePicker.aspx?ctlID=" + ctlID , "SelectTime" , features , "");
        
    return true;
    }

    html调用,
    <INPUT style="BACKGROUND-IMAGE: url(../Resource/img/DatePicker.gif)" onclick="return showWindow('320','210','txtStartTime')" type="button" value="open window">


    模式窗口, 并获得窗口的返回值,
    function ShowModelWin(cmp,code,TypeId,iHeight,iWidth,ysc,dc,zxd,cf,bw,ch)
    {
        
        
    var features = "dialogHeight: " + iHeight + "px;";
        features 
    += "dialogWidth: " + iWidth + "px;";
        features 
    += "help: no; status: no; scroll: auto";
        
    var ret=window.showModalDialog("ResourceSelect.aspx?cmpname=" + cmp + "&ysc=" + ysc + "&dc=" + dc + "&zxd=" + zxd + "&cf=" + cf + "&bw=" + bw + "&chuan=" + ch , "", features);
        
        
    if(ret == 'Success')
            window.location.href
    ="WorkItemDetail.aspx?code=" + code ;
        
    }

    C#调用,
    this.RegisterStartupScript("open","<script language=javascript>ShowModelWin('" + cmp + "','" + code + "','" + TypeId + "','400','600','" + i.ToString() + "','" + j.ToString() + "','" + k.ToString() + "','" + m.ToString() + "','" + n.ToString() + "','" +  o.ToString() + "');</script>");

    关闭窗口的时候设置窗口的返回值,
    this.RegisterStartupScript("freshOpener","<script language=javascript>window.returnValue=\"Success\";window.close();</script>");
  • 相关阅读:
    python中的字典
    python中的元组操作
    python中的列表
    python中的内建函数
    python中格式化字符串
    34 哈夫曼编码
    33 构造哈夫曼树
    32 哈夫曼树
    31 树和森林的遍历
    30 森林和二叉树的转化(二叉树与多棵树之间的关系)
  • 原文地址:https://www.cnblogs.com/silva/p/299596.html
Copyright © 2020-2023  润新知