js复制问题,解决马上给分!
前台有个这样的标签
<asp:Label ID="OppidLabel" runat="server"></asp:Label>
在js里面
document.getElementById("OppidLabel").innerText = hyid;
在后台获取前台的label标签的text
int hyid = Convert.ToInt32(this.OppidLabel.Text);
值确定已经传进去了。hyid
查看源代码 <span id="ctl00_Contentplaceholder1_OppidLabel"></span>是这样的!
如过我是这样做<asp:Label ID="OppidLabel" runat="server" Text="10014"></asp:Label>
this.OppidLabel.Text就有值@
请问为什么this.OppidLabel.Text是个空值?