服务端实现这个难,而且慢,你用javascript可以轻松实现<script>
var t = setInterval("add()", 100);
function add()
{
var txt1 = document.all("txt1").value;
if(txt1 >= 99)
clearInterval(t);
else
document.all("txt1").value = parseInt(txt1) + 1;
}
</script>
<input type=text id=txt1 value="0">
var t = setInterval("add()", 100);
function add()
{
var txt1 = document.all("txt1").value;
if(txt1 >= 99)
clearInterval(t);
else
document.all("txt1").value = parseInt(txt1) + 1;
}
</script>
<input type=text id=txt1 value="0">
{
label.Text += i.ToString()+"<br>";
}
一是用xmlhttp方式二是执行服务端事件, 但那样的话, 页面会狂刷新
while(dr.Read());
{
for( )
{
}
}
dr.Close();