熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

彈出頁面返回選擇值

2022-06-13   來源: .NET編程 

  主頁面

  <!彈出窗體>

  <script type=text/javascript >

  function Pop()

  {

  var dept = documentgetElementById(<%= Lab_deptClientID %>)innerText;

  var result = showModalDialog(SelectProd_noaspx?dept= + dept subpage dialogWidth:px;dialogHeight:px;center:yes;help:no;resizable:no;status:no);  //打開模態子窗體並獲取返回值

  documentgetElementById(txt_prod_no)value = resultsplit()[];  //返回值分別賦值給相關文本框

  documentgetElementById(txt_goods_id)value = resultsplit()[];

  documentgetElementById(txt_m_id)value = resultsplit()[];

  documentgetElementById(txt_batch)value = resultsplit()[];

  }

  </script>

  <asp:LinkButton ID=lbn_find runat=server Width=>查找</asp:LinkButton>

  thislbn_findAttributesAdd(onclick Pop());

  彈出頁面

  <!返回選擇的值>

  <script type=text/javascript >

  function cc(prod_no cle_mid m_id mk_qty) //參數分別為idname和password

  {

  windowreturnValue = prod_no  + + cle_mid + + m_id + + mk_qty;   //返回值

  windowclose();

  }

  </script>

  protected void GridView_RowDataBound(object sender GridViewRowEventArgs e)

  {

  if (eRowRowType == DataControlRowTypeDataRow)//判定當前的行是否屬於datarow類型的行

  {

  //返回選擇的值

  eRowAttributesAdd(OnDblClick cc( + eRowCells[]Text + + eRowCells[]Text + + eRowCells[]Text +   + eRowCells[]Text + ));

  LinkButton lbn_select = (LinkButton)eRowFindControl(lbn_select);

  lbn_selectAttributesAdd(onclick cc( + eRowCells[]Text + + eRowCells[]Text + + eRowCells[]Text +   + eRowCells[]Text + ));

  }

  }


From:http://tw.wingwit.com/Article/program/net/201311/13123.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.