<script type="text/javascript">
//<![CDATA[
function fstatus() {
for (var i=0; i<100000; i++) {
window.status = "now process is \"" +i+ "\"";
}
}
function finnerHtml() {
for (var i=0; i<1000; i++) {
document.getElementById("demo").innerHTML = "now process is \"" +i+ "\"";
}
}
//]]>
</script>
<input type="button" onclick="fstatus()" value="test status"/>
<input type="button" onclick="finnerHtml()" value="test innerHTML"/>
<div id="demo"></div>
In the above example,one have a loop and display it real time use innerHTML property, another is use window.status.
However, the window.status in real time that perfect display the loop digit, but the innerHTML property is not.
Just display result digit: now process is "999".
And how to using innerHTML display real time data? can but use window.setTimeout, or window.setInterval method, like this:
var cnt=0;
function finnerHtml() {
if (cnt++>=1000) return;
document.getElementById("demo").innerText = "now process is \"" +cnt+ "\"";
window.setTimeout(finnerHtml,10)
}
But, it's no convenient. the display speed is not well, and we must control something.
e.g.
setTimeout variables, when it completely.
So, I propose winodw.status to replace innerHTML property when display in real time.
//<![CDATA[
function fstatus() {
for (var i=0; i<100000; i++) {
window.status = "now process is \"" +i+ "\"";
}
}
function finnerHtml() {
for (var i=0; i<1000; i++) {
document.getElementById("demo").innerHTML = "now process is \"" +i+ "\"";
}
}
//]]>
</script>
<input type="button" onclick="fstatus()" value="test status"/>
<input type="button" onclick="finnerHtml()" value="test innerHTML"/>
<div id="demo"></div>
In the above example,one have a loop and display it real time use innerHTML property, another is use window.status.
However, the window.status in real time that perfect display the loop digit, but the innerHTML property is not.
Just display result digit: now process is "999".
And how to using innerHTML display real time data? can but use window.setTimeout, or window.setInterval method, like this:
var cnt=0;
function finnerHtml() {
if (cnt++>=1000) return;
document.getElementById("demo").innerText = "now process is \"" +cnt+ "\"";
window.setTimeout(finnerHtml,10)
}
But, it's no convenient. the display speed is not well, and we must control something.
e.g.
setTimeout variables, when it completely.
So, I propose winodw.status to replace innerHTML property when display in real time.
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月30日
2024年11月30日
- 窦唯《八段锦》(上海音像)[WAV+CUE]
- DJ动力100%《堵在路上的解闷high曲》[FLAC/MP3][948M]
- 节奏炸裂《抖音最嗨 DJ 舞曲大合集》[FLAC/MP3][2G]
- 群星《百代No.1精选》[WAV+CUE][965M]
- 费玉清《中华民GUO》海山专辑[正版原抓WAV+CUE]
- Brahms-PianoConcertoNo.2(KarlBohm-VPO,WilhelmBackhaus-piano,1967)[SACD-WAV]
- ConcertoScirocco-SirensSoldiers.SongswithoutWordsfromtheItalianSeicento(2024)[24B
- 群星《天赐的声音第五季 第12期》[320K/MP3][339.36MB]
- 群星《天赐的声音第五季 第12期》[FLAC/分轨][1.64G]
- 颜人中《这是一张情歌专辑》[320K/MP3][48.9MB]
- Mozart-ViolinConcertosNos.34-FrancescaDego,RoyalScottishNationalOrchestra,SirR
- Mendelssohn,Dvorak-ViolinConcertos-Menuhin,Enescu(2010)FLAC+CUE
- 黑鸭子2006-樱桃女声[首版][WAV+CUE]
- 颜人中《这是一张情歌专辑》[FLAC/分轨][258.76MB]
- 华晨宇《华晨宇日出演唱会特辑》[320K/MP3][101.77MB]