最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
runat=server控件值保存、修改没有解决方案
时间:2022-06-25 04:03:51 编辑:袖梨 来源:一聚教程网
代码如下 | 复制代码 |
function Save()//保存不是服务端控件的值 { var 1= document.getElementById('1Box').value; var 2 = document.getElementById('2Box').value; var TxtValue = 1 + "■" + 2; document.getElementById('3).value = TxtValue; return true; } window.onload=function show() { var TxtValue = document.getElementById('3).value; if (TxtValue != "") { EachValue = new Array(); EachValue = TxtValue.split('■'); document.getElementById('1Box').value = EachValue[0]; document.getElementById('2Box').value = EachValue[1]; } return true; } html: |
CS:
代码如下 | 复制代码 |
void LoadData()//页面加载 { btnSave.Attributes.Add("onclick", "javascript:Save();"); string[] strTxtValues = new string[2]; strTxtValues[0] = dr["1"].ToString(); strTxtValues[1]=dr["2"].ToString(); string strValues = strTxtValues[0]; for (int i = 1; i < strTxtValues.Length; i++) { strValues += "■" + strTxtValues[i]; } this.3.Value = strValues; } private void SaveOrUpdate()//保存、修改 { string[] strTxtValues = this.3.Value.Split('■'); string 1= strTxtValues[0]; string 2= strTxtValues[1]; } |
相关文章
- 第五人格佣兵护腕怎么用 第五人格佣兵护腕教学 04-28
- 崩铁星穹列车年度开拓报告活动怎么玩 星穹列车年度开拓报告网页活动介绍 04-28
- 逆水寒手游五子棋残局三十二怎么过 04-28
- 崩坏星穹铁道齐颂给谁用 04-28
- 火影忍者手游旋涡鸣人仙人模式怎么玩 04-28
- 原神怎么破坏磐键 原神破坏磐键的方法 04-28