zoukankan      html  css  js  c++  java
  • 客户端执行 DDL下拉框调用页面JAVACRIP 涵数ddlQuery.Attributes.Add("onchange","changeSearchText();"); DataGrid 绑定项调用JAVASCRIPT,客户端

    private void Page_Load(object sender, System.EventArgs e)
      {
          ddlQuery.Attributes.Add("onchange","changeSearchText();");
       
       if(!this.Page.IsPostBack)
       {
           PageNaivegate();
       }
      }

    ====================

    <script language="javascript" type="text/javascript">
     function changeSearchText()
     {
       alert(111);
     }

    </script>
    ====================================================

    2

     private void Page_Load(object sender, System.EventArgs e)
      {
       string target=Request.Params["__EVENTTARGET"];
        string args=Request.Params["__EVENTARGUMENT"];
       ddlQuery.Attributes.Add("onchange","changeSearchText();");
       AjaxPro.Utility.RegisterTypeForAjax(typeof(mrp.hk.vendorManageUI));

       if(!this.Page.IsPostBack || (target != null && target=="pagesizeChange"))
       {
        PageNaivegate();
       }
      }

    --------------------------

    <script language="javascript" type="text/javascript">
    var pagesize = "<%=PagesizeControl%>";
    function changePageSize(control)
     {
      if(control.value=="更改頁面大小")
      {
       document.getElementById(pagesize).style.display="";
       control.value="確定";
      }
      else
      {
       document.getElementById(pagesize).style.display="none";
       control.value=="更改頁面大小"
       __doPostBack("pagesizeChange","pagesizeChange");//调用服务端事件
      }
     }
     function changeSearchText()
     {
       alert(111);
     }

    </script>

    ========================DataGrid 绑定项调用JAVASCRIPT,客户端========

    3 private void dgDraw_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
      {
       if(e.Item.ItemType != ListItemType.Header)
       {
        if(e.Item.Cells[11].Text == "1")
        {
         e.Item.Cells[11].Text="可领料";
         e.Item.BackColor=System.Drawing.Color.LightGreen;
        }
        else if(e.Item.Cells[11].Text == "0")
        {
         e.Item.Cells[11].Text="缺料";
         e.Item.BackColor=System.Drawing.Color.FromArgb(144,238,255);
        }
        else if(e.Item.Cells[11].Text == "2")
        {
         e.Item.Cells[11].Text="料领完";
         e.Item.BackColor=System.Drawing.Color.LightGreen;
        }
       
        e.Item.Cells[12].Text="<span onclick=\"openGetInfo('"+e.Item.Cells[0].Text+"')\"  style='CURSOR: hand'>查 看</span>";
        e.Item.Cells[1].Text="<span onclick=\"openGetInfo('"+e.Item.Cells[0].Text+"')\"  style='CURSOR: hand'>"+e.Item.Cells[1].Text+"</span>";
       }
      }

    ----------------------

    <script language="javascript">


       function openGetInfo(value)
       {
       window.open('projectDetailinfo.aspx?vgetID='+value+'','aaaa','height=720,width=800,top=0,left=8,scrollars=yes');
       }
    </script>

  • 相关阅读:
    字符串数组转化成json格式
    php关于发送和接受二进制数据
    thinkphp路径问题
    fread与file_get_contents读取函数文件
    php用urlencode、urldecode解决汉字乱码问题
    ThinkPHP关于数据库的操作
    Pytorch中torch.autograd ---backward函数的使用方法详细解析,具体例子分析
    TensorFlow tf.gradients的用法详细解析以及具体例子
    好用的函数,assert,random.sample,seaborn tsplot, tensorflow.python.platform flags 等,持续更新
    pytorch autograd backward函数中 retain_graph参数的作用,简单例子分析,以及create_graph参数的作用
  • 原文地址:https://www.cnblogs.com/csj007523/p/1278501.html
Copyright © 2011-2022 走看看