This article mainly introduces a few sections of JavaScript code that are commonly used, and friends who need it can refer to the following
Auto return after 1.3 seconds code as follows: <span id= "Totalsecond" >3</span> seconds after automatically return <script language= "javascript "Type=" Text/javascript "> <!-- var second = document.getElementById (' Totalsecond '). textcontent; if (navigator.appName.indexOf ("explorer") >-1)//judgment is IE browser or Firefox browser, take the appropriate measures to obtain the number of seconds { second = document.getElementById (' Totalsecond ') .innertext; } else { second = document.getElementById (' Totalsecond ') .textcontent; } setinterval ("redirect ()", 1000); Call Redirect () method once every 1 seconds function redirect () { if (second < 0) { location.href = ' http://w Ww.baidu.com '; } else { if (navigator.appName.indexOf ("explorer") >-1) { document.getElementById (' Totalsecond '). innertext = second--; } else { (' Totalsecond '). textcontent = second--; } } } --> </script>