易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript_基于JS的进度条

开发时,需要用到的JavaScript进度条~~~
<style type="text/css">
#out {
width:200px;
height:16px !important;
border:1px solid #5858D1;
text-align:center;
position:relative;
font-size:12px;
_height:18px;
}
#out, #out * {
padding:0;
margin:0;
}
#num {
height:16px;
line-height:16px;
position:absolute;
top:0;
left:90px;
z-index:1001;
}
#step {
background:#5858D1;
width:5%;
overflow:hidden;
position:absolute;
left:0;
top:0;
height:16px;
z-index:1000;
}
</style>
<div id="out">
<span id="num">5%</span>
<div id="step"></div>
</div>
<script type="text/javascript">
var timer;
var stepNum = 0;
function start()
{
timer = setInterval("begin()", 10);
}
function begin()
{
stepNum += 1;
if (stepNum < 101)
{
document.getElementById("step").style.width = stepNum + "%";
document.getElementById("num").innerHTML = stepNum + "%";
}
else
{
clearInterval(timer);
// 加载完了,该干嘛干嘛
//window.location = 'http://www.codebit.cn';
}
}
window.onload = function()
{
start();
}
</script>
<Br><br>
<span style="padding:0;margin:0;width:200px;height:16px !important;border:1px solid #5858D1;text-align:center;position:relative;font-size:12px;_height:18px;">
<span style="width:50px;height:16px;position:absolute;left:0;top:0;background:#5858D1;width:50%"></span>
</span>


相关文档:

JavaScript 面向对象

(转http://www.javaeye.com/topic/155109)
JavaScript 是面向对象的。但是不少人对这一点理解得并不全面。
在 JavaScript 中,对象分为两种。一种可以称为“普通对象”,就是我们所普遍理解的那些:数字、日期、用户自定义的对象(如:{})等等。
还有一种,称为“方法对象”,就是我们通常定义的 f ......

深入理解JavaScript的变量作用域

深入理解JavaScript的变量作用域
http://www.cnblogs.com/rainman/archive/2009/04/28/1445687.html
在学习JavaScript的变量作用域之前,我们应当明确几点:
a、JavaScript的变量作用域是基于其特有的作用域链的。
b、JavaScript没有块级作用域。
c、函数中声明的变量在整个函数中都有定义。
1、JavaScript的作用域链 ......

JavaScript函数定义语法总结

JavaScript
函数定义语法总结
作者

黄诚
QQ
群:
65643887
1
.正常的定义方法:
function functionName([arguments]){
    
Javascript statements
    
[return expression]
}

1:
function evalScript( i, elem ) {
     &n ......

javascript中获取一个字符串中 特定字符串的个数

//统计字符串中特定字符串的个数
function getStrCount(scrstr,armstr)
{ //scrstr 源字符串 armstr 特殊字符
 var count=0;
 while(scrstr.indexOf(armstr) >=1 )
 {
    scrstr = scrstr.replace(armstr,"")
    count++;   
 }
 re ......

IE和FireFox的兼容的javascript回车事件

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>
<!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 runat="serve ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号