zoukankan      html  css  js  c++  java
  • C# 关闭页面和弹出页面,参数传值是汉字时

    弹出页面:


        <script language="javascript">
        var pageweb;
        function openwin(pageweb){
        window.open(pageweb,"","width=400px,height=200px;toolbar=no, menubar=no, scrollbars=yes, resizable=yes");
        }

        </script>

        <a href="#" onclick="openwin('Default20.aspx')">asdfs</a>

    关闭页面:


        <script language="javascript">

        var mes;
        function closewin(mes)
        {
        alert(mes);
        this.window.opener=null;
        window.close();
        }
        </script>

        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "message", "<script>closewin('参数有误');</script>");

    参数传值是中文时:

       strsql.Append("<td><a href=\"#\" onclick=\"openwin('QueryMaterialTimeDetail.aspx?timetype=" + Server.UrlEncode(litlelist[j].ToString()) + "&amp;client=" + strClient + "')\" >" + dt2.Rows[i][j].ToString() + " </a></td>");

     string timetype = Request.QueryString["timetype"].ToString();
     timetype = Server.UrlDecode(timetype);

  • 相关阅读:
    视图和触发器
    45题的难点
    表连接、Tsql基本编程和存储过程
    五种函数、子查询和分页查询
    语句创建数据库表及增删改查
    约束
    pyhton的参数类型
    python的数组与集合
    python基础--编码
    NSIS的Push与Pop
  • 原文地址:https://www.cnblogs.com/lgxll/p/2678661.html
Copyright © 2011-2022 走看看