zoukankan      html  css  js  c++  java
  • C# 调用JS 并为JS变量设置

    protected void Button1_Click(object sender, EventArgs e)
            {
                ClientScriptManager csm = this.ClientScript;
                string js = string.Format("window.dialogArguments.document.getElementById('txtEquId').value='{0}';", GetEquIds());
                js += string.Format("window.dialogArguments.document.getElementById('txtEquId').value='{0}';window.close();", GetEquNames());
                csm.RegisterStartupScript(this.GetType(), "sufei", js, true);
            }
    
    <table border="0" cellpadding="0" class="PageBottom" cellspacing="0" id="Table1"
            width="100%" align="center">
            <tr>
                <td align="center">
                    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
                    <input type="button" value="确定" class="Button" id="Button2"  onclick="oks();"/>
                    <input type="button" value="关闭" class="Button" id="btnBack" />
                </td>
            </tr>
        </table>
    
  • 相关阅读:
    AI进阶之路
    python--数学运算函数
    QT之QChar
    字符串类QString
    Qt5多线程
    matplotlib动画
    matplotlib的安装和允许中文及几种字体
    python---wav音频
    python---多线程
    python--Excel模块xlwings
  • 原文地址:https://www.cnblogs.com/soundcode/p/2532995.html
Copyright © 2011-2022 走看看