读书人

Repeater 控件奇怪的解决方案

发布时间: 2012-03-01 10:25:47 作者: rapoo

Repeater 控件奇怪的
我在Repeater控件的<FooterTemplate>中添加了一Lable 控件Lable控件值。
如:document.getElementById("Rep1_ctl16_Lab_CurrentImMonth").value = "Test";
用window.alert(document.getElementById("Rep1_ctl16_Lab_CurrentImMonth").value )可以把值出
就是在面上不能把值示出。

[解决办法]
1.Rep1_ctl16_Lab_CurrentImMonth已经是ClientID了吗?

2.
document.getElementById("Rep1_ctl16_Lab_CurrentImMonth").InnerText = "Test";

[解决办法]
document.getElementById("Rep1_ctl16_Lab_CurrentImMonth").innerHTML= "Test";
[解决办法]
js赋值的话 ,onblur事件 ,光标离开repeater控件时,赋值 ?
别用value ,用innerHTML 赋值 。看看

读书人网 >asp.net

热点推荐