例子页面
发邮箱6567572@@163.com
谢谢
13 个解决方案
#1
这个是网页上用javascript+换图片,与Java没有任何关系
#2
Up,Java有Timer,可以定时发邮件等等。
#3
弱弱的问一下 javascript 和JAVA有关系么,我是新手不太懂,大侠们帮忙
#4
javascript 是客户端执行的,Java在服务器端执行
#5
你应该去Java EE发问
#6
没有一点关系。
javascript原名livescript,当时 Java刚刚火爆,遂更名。
#7
有大侠能发一个程序我研究研究吗,谢谢啦
#8
#9
没人么
#10
function time(dif,diff){
var h,m,s,ms;
/*for(i=0;i<10;i++){
document.getElementById("Milliseconds_one").getElementsByTagName("span")[i].className = "s_"+i+" none";
document.getElementById("Milliseconds_two").getElementsByTagName("span")[i].className = "s_"+i+" none";
}*/
if(diff>0){
h = parseInt(diff/(60*60*1000)).toString();
m = parseInt((diff % (60 * 60 * 1000))/(60 * 1000)).toString();
s = parseInt(((diff % (60 * 60 * 1000))%(60 * 1000))/1000).toString();
s1 = parseInt(((dif % (60 * 60 * 1000))%(60 * 1000))/1000).toString();
m1= parseInt((diff % (60 * 60 * 1000))/(60 * 1000)).toString();
ms = parseInt(((diff % (60 * 60 * 1000))%(60 * 1000))%1000).toString();
if(s1!=s){
dif=diff;
for(i=0;i<10;i++){
document.getElementById("hours_one").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("hours_two").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Minutes_one").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Minutes_two").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Second_one").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Second_two").getElementsByTagName("span")[i].className = "d_"+i+" none";
}
//秒要变化
if(s<10) s="0"+s;
if(h<10) h="0"+h;
if(m<10) m="0"+m;
setStyle("hours","b_",h);
setStyle("Minutes","b_",m);
setStyle("Second","b_",s);
}
//if(ms<10) ms="0"+ms;
//setStyle("Milliseconds","s_",ms);
setTimeout(function(){time(dif,diff-1000)},1000);
}else{
document.getElementById("hours_one").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("hours_two").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Minutes_one").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Minutes_two").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Second_one").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Second_two").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Milliseconds_one").getElementsByTagName("span")[0].className = "s_0";
document.getElementById("Milliseconds_two").getElementsByTagName("span")[0].className = "s_0";
var css = document.getElementById("seckillButtion").className;
if(css=='btn_false'){
document.getElementById("seckillButtion").setAttribute('className', 'btn_true');
document.getElementById("seckillButtion").setAttribute('class', 'btn_true');
}else{
document.getElementById("seckillButtion").setAttribute('className', 'btn_false');
document.getElementById("seckillButtion").setAttribute('class', 'btn_false');
}
}
}
主要就这一段JS
#11
谢谢大家啦 好像java代码呀
#12
看了都无语了
#13
谢谢大家了
#1
这个是网页上用javascript+换图片,与Java没有任何关系
#2
Up,Java有Timer,可以定时发邮件等等。
#3
弱弱的问一下 javascript 和JAVA有关系么,我是新手不太懂,大侠们帮忙
#4
javascript 是客户端执行的,Java在服务器端执行
#5
你应该去Java EE发问
#6
没有一点关系。
javascript原名livescript,当时 Java刚刚火爆,遂更名。
#7
有大侠能发一个程序我研究研究吗,谢谢啦
#8
#9
没人么
#10
function time(dif,diff){
var h,m,s,ms;
/*for(i=0;i<10;i++){
document.getElementById("Milliseconds_one").getElementsByTagName("span")[i].className = "s_"+i+" none";
document.getElementById("Milliseconds_two").getElementsByTagName("span")[i].className = "s_"+i+" none";
}*/
if(diff>0){
h = parseInt(diff/(60*60*1000)).toString();
m = parseInt((diff % (60 * 60 * 1000))/(60 * 1000)).toString();
s = parseInt(((diff % (60 * 60 * 1000))%(60 * 1000))/1000).toString();
s1 = parseInt(((dif % (60 * 60 * 1000))%(60 * 1000))/1000).toString();
m1= parseInt((diff % (60 * 60 * 1000))/(60 * 1000)).toString();
ms = parseInt(((diff % (60 * 60 * 1000))%(60 * 1000))%1000).toString();
if(s1!=s){
dif=diff;
for(i=0;i<10;i++){
document.getElementById("hours_one").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("hours_two").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Minutes_one").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Minutes_two").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Second_one").getElementsByTagName("span")[i].className = "d_"+i+" none";
document.getElementById("Second_two").getElementsByTagName("span")[i].className = "d_"+i+" none";
}
//秒要变化
if(s<10) s="0"+s;
if(h<10) h="0"+h;
if(m<10) m="0"+m;
setStyle("hours","b_",h);
setStyle("Minutes","b_",m);
setStyle("Second","b_",s);
}
//if(ms<10) ms="0"+ms;
//setStyle("Milliseconds","s_",ms);
setTimeout(function(){time(dif,diff-1000)},1000);
}else{
document.getElementById("hours_one").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("hours_two").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Minutes_one").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Minutes_two").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Second_one").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Second_two").getElementsByTagName("span")[0].className = "b_0";
document.getElementById("Milliseconds_one").getElementsByTagName("span")[0].className = "s_0";
document.getElementById("Milliseconds_two").getElementsByTagName("span")[0].className = "s_0";
var css = document.getElementById("seckillButtion").className;
if(css=='btn_false'){
document.getElementById("seckillButtion").setAttribute('className', 'btn_true');
document.getElementById("seckillButtion").setAttribute('class', 'btn_true');
}else{
document.getElementById("seckillButtion").setAttribute('className', 'btn_false');
document.getElementById("seckillButtion").setAttribute('class', 'btn_false');
}
}
}
主要就这一段JS
#11
谢谢大家啦 好像java代码呀
#12
看了都无语了
#13
谢谢大家了