zoukankan      html  css  js  c++  java
  • C# 后台生成HMLT按钮并赋予onclick属性

               声明 table 格

                TableCell cell0 = new TableCell();

               此生成的Button会导致页面回发
                //HtmlButton btn = new HtmlButton();

               此为html按钮
                HtmlInputButton btn = new HtmlInputButton();
                btn.Value = "测试按钮";
                btn.ID = "2";
                给html按钮添加onclick属性
                btn.Attributes.Add("onclick","openwindows();");

                将此按钮搁到table格中
                cell0.Controls.Add(btn);

  • 相关阅读:
    Linux内存分析
    mysql 分表
    安装YCM
    c/c++ 之静态库
    ubuntu20 宽带连接
    数据对齐
    计算机中浮点数的表示
    整数的表示
    信息的储存
    SparseTable ST表
  • 原文地址:https://www.cnblogs.com/Jack_G/p/2728666.html
Copyright © 2011-2022 走看看