zoukankan      html  css  js  c++  java
  • aspx页面中的OnClientClick,和cs代码中的Response.Write("")

    在Button中 
    <asp:Button ID="lblToInvoic" runat="server"  OnClientClick="fff()" CssClass="btn2" Text="开发票" OnClick="lblToInvoic_Click" />

    然后在页首写<script language="JavaScript">
    function    fff()
    {
       
    }

    和在cs文件里写:
     protected void lblToInvoic_Click(object sender, EventArgs e)
     
    {
    ..
    Response.Write(
    "<script>window.dialogArguments[0].document.getElementById(window.dialogArguments[1]).value =\"" + strValue1 + "\";window.dialogArguments[0].document.getElementById(window.dialogArguments[2]).value =\"" + strValue2 + "\";window.dialogArguments[0].document.getElementById(window.dialogArguments[3]).value =\"" + strValue3 + "\";window.dialogArguments[0].document.getElementById(window.dialogArguments[4]).value =\"" + strValue4 + "\";window.close();</script>");

    }

    是一样的。
    只是代码位置不同。
  • 相关阅读:
    Alpha版(内部测试版)发布
    冲刺2-3
    冲刺2-2
    冲刺2-1
    团队绩效评价
    改进方案
    意见汇总
    27组评价
    冲刺10
    SOA
  • 原文地址:https://www.cnblogs.com/simhare/p/836735.html
Copyright © 2011-2022 走看看