setTimeout( function(){ //add your code}, 5 * 1000 );//延迟5000毫米
让html里的js脚本延迟5秒运行
原文:http://www.cnblogs.com/dotnetHui/p/8080048.html