<script>
function g_demo_fun(demo_number){
var g_demo=document.getElementById(demo_number);// Bind scroll labels
var cp_outtime=500;// Set the interval for refreshing
var g_Number=g_demo.innerHTML;// Copy the label value
var g_Number_min=g_Number-53;
console.log(g_Number_min);

function Gundong(){

if(g_Number_min<g_Number){
g_Number_min=g_Number_min+3;
g_demo.innerHTML=g_Number_min;	
}
else if(g_Number_min>=g_Number){
g_Number_min=g_Number_min-16;
cp_outtime=50;
console.log("= ="+g_Number_min+"cp_outtime="+cp_outtime); }}var MyMar=setInterval(Gundong,cp_outtime); 
 }
</script>
Copy the code

This is the JS code

<div id="demo1">
	1000
</div>
 <script type="text/javascript">
g_demo_fun("demo1");
</script>

<div id="demo2">
	1880
</div>
 <script type="text/javascript">
g_demo_fun("demo2");
</script>
 

<div id="demo3">
	880
</div>
 <script type="text/javascript">
g_demo_fun("demo3");
</script>
Copy the code

This is the HTML code

\

The effect of download package: download.csdn.net/detail/cplv… I only need 2 integrals