1,JS进度条做法:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
- <html xmlns="" >
- <head>
- <title>进度条</title>
- <style type="text/css">
- body{
- text-align:center;
- }
- .graph{
- width:355px;
- border:1px solid #66A0D1;
- height:14px;
- background-color:#88BADF;
- }
- #bar{
- display:block;
- background:#56D3FF;
- float:left;
- height:100%;
- text-align:center;
- }
- #barNum{
- position:absolute;
- }
- </style>
- <script type="text/javascript">
- function $(obj){
- return document.getElementById(obj);
- }
- function go(){
- $("bar").style.width = parseInt($("bar").style.width) + 1 + "%";
- $("bar").innerHTML = $("bar").style.width;
- if($("bar").style.width == "100%"){
- window.clearInterval(bar);
- }
- }
- var bar = window.setInterval("go()",100);
- window.onload = function(){
-
- }
- </script>
- </head>
- <body>
- <div class="graph">
- <strong id="bar" style="width:1%;"></strong>
- </div>
- </body>
- </html>
2,编码检测
点击(此处)折叠或打开
- <span id="l"></span>
- <script>
- document.getElementById("l").innerHTML = "\u6807\u9898 \u6216\u8005 \u5185\u5bb9 \u81f3\u5c11\u8981\u586b\u5199\u4e00\u9879\u624d\u53ef\u4ee5\u53d1\u5e03\u5662\uff5e";
- </script>
3,链接地址:JavaScript/HTML格式化:
阅读(1970) | 评论(0) | 转发(0) |