1.weflow
exe文件mac无法执行,下载dmg包
2.mui
3.vue
4.js控制n秒后跳转到指定页面,并显示倒计时
<!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="server"> <title>setTimeout</title> </head> <body> <form id="form1" runat="server"> <div id='div1'> </div> </form> </body> </html> <script type="text/javascript"> //设定倒数秒数 var t = 10; //显示倒数秒数 function showTime(){ t -= 1; document.getElementById('div1').innerHTML= t; if(t==0){ location.href='http://www.baidu.com'; } //每秒执行一次,showTime() setTimeout("showTime()",1000); } //执行showTime() showTime(); </script>
JS中setInterval、setTimeout不能传递带参数的函数的解决方案
一、采用字符串形式:——(缺陷)参数不能被周期性改变setInterval("foo(id)",1000);
二、匿名函数包装 (推荐) window.setInterval(function()
{
foo (id);
}, 1000);
这样就可以周期性执行foo(id)这个函数,而且把变量id传递进去
三、定义返回无参函数的函数
function foo(id)
{
alert(id);
}
function _foo(id)
{
return function()
{
foo(id);
}
}
window.setInterval(_foo(id),1000);
修改setInterval
function foo(id)
{
alert(id);
}
var _sto = setInterval;
window.setInterval = function(callback,timeout,param)
{
var args = Array.prototype.slice.call(arguments,2);
var _cb = function()
{
callback.apply(null,args);
}
_sto(_cb,timeout);
}
window.setInterval(hello,3000,userName);
picker组件和滚动和date组件了解一下
better-scroll的参数和方法:https://www.cnblogs.com/cangqinglang/p/8553746.html