这里有新鲜出炉的 Javascript 教程,程序狗速度看过来!
Javascript 是一种由 Netscape 的 LiveScript 发展而来的原型化继承的基于对象的动态类型的区分大小写的客户端脚本语言,主要目的是为了解决服务器端语言,比如 Perl,遗留的速度问题,为客户提供更流畅的浏览效果。
javascript 实现页面加载进度条代码,需要的朋友可以参考下。
[Ctrl+A 全选 注:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- New Document
- </title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <script type="text/javascript">
- < !--document.write('<div id="loadbox"><span>加载中,请耐心等待</span><img class="img-responsive" src="http://files.jb51.net/upload/2010-4/20100411182122592.gif" width="160" height="20" /></div>');
- window.onload = function() {
- document.getElementById('loadbox').style.display = "none";
- document.getElementById('imglist').style.display = "block";
- }
- // -->
- </script>
- <style type="text/CSS">
- <!-- body {background-color:#000;} #imglist { display:none;color:#FFFFFF;}
- #loadbox { width:160px;height:60px; position:absolute;top:50%;left:50%;margin-left:-80px;margin-top:-30px;}
- #loadbox span {height:30px;display:block;width:160px;text-align:center;
- color:#FFF; font-size:12px;} -->
- </style>
- </head>
- <body>
- <div>
- <h1>
- 欧文加油!
- </h1>
- <img class="img-responsive" src="http://img.phperz.com/data/img/20170322_17/1490191486_8549.jpg"
- width="500" height="413" />
- <img class="img-responsive" src="http://img.phperz.com/data/img/20170322_6/1490191487_8611.jpg"
- width="800" height="600" />
- </div>
- </body>
- </html>
如需引入外部 Js 需刷新才能执行
]来源: http://www.phperz.com/article/17/0420/285165.html