- 论坛徽章:
- 0
|
在状态栏显示输入内容
var text = "您在输入栏里输入什么,我就显示什么,不信就试试吧!";
var total_length = 60;
function input(msg) {
var status_message = "";
var assembling = "";
this.status = status_message;
var index = 0;
var location = 0, i;
for(i=0; i -1;j--) {
assembling = "";
for(var k=0; k
(二) 页面装载效果
var speed=20
var temp=new Array()
var temp2=new Array()
if (document.layers){
for (i=1;iwindow.innerHeight)
clearInterval(stopit)
}
else if (document.all){
clipbottom-=speed
for (i=1;i
(三)状态栏的时间显示
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes = 12) ? " P.M." : " A.M."
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock () {
stopclock();
showtime();
}
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14203/showart_84098.html |
|