我是火狐,能停下来。。。
为什么我第一次看到clearInterval的用法是想到定义一个函数去调用呢- -
发现不行,有没有大神告诉我函数的方法怎么写
为什么我第一次看到clearInterval的用法是想到定义一个函数去调用呢- -
发现不行,有没有大神告诉我函数的方法怎么写
2015-05-22
var myweek = new Date().getDay()
switch(myweek)
{
case 1:
alert("Today it's"+ myweek);
break;
case 2:
alert("Today it's"+ myweek);
break;
case 3:
alert("Today it's"+ myweek);
break;
case 4:
alert("Today it's"+ myweek);
break;
case 5:
alert("Today it's"+ myweek);
break;
}
switch(myweek)
{
case 1:
alert("Today it's"+ myweek);
break;
case 2:
alert("Today it's"+ myweek);
break;
case 3:
alert("Today it's"+ myweek);
break;
case 4:
alert("Today it's"+ myweek);
break;
case 5:
alert("Today it's"+ myweek);
break;
}
2015-05-22
首先看function sortNum(a,b) 其中的a,b 不是参数 而是unicode码里面的a,b 若是参数 应该写成 function sortNum(var a,var b)
return b-a; 返回的是负数~ sort 函数是根据正负来定义升序和降序的
return b-a; 返回的是负数~ sort 函数是根据正负来定义升序和降序的
2015-05-21
想到之前看到的eval, 用在这也可以.
function count(){
var num1 = document.getElementById("txt1").value;
var num2 = document.getElementById("txt2").value;
var oper = document.getElementById("select").value;
document.getElementById("fruit").value=eval( num1+oper+num2 );
}
function count(){
var num1 = document.getElementById("txt1").value;
var num2 = document.getElementById("txt2").value;
var oper = document.getElementById("select").value;
document.getElementById("fruit").value=eval( num1+oper+num2 );
}
每次都得先把 while 或者 for 改个错误的名字,要不然老是死循环, chrome 本来就吃内存,老是卡死哎。 :(
2015-05-21
document.write(mystr.substring(mystr.indexOf("W"),mystr.indexOf("!")+1) + "<br />");
2015-05-21