解决 Layer.js 提示层弹窗结束之后自动跳转到新页面的问题
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<link rel="stylesheet" type="text/css" href="layer_mobile/need/layer.css"/>
</head>
<body>
<script src="layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
layer.open({
content: 'hello layer',
skin: 'msg',
time: 2, //2秒后自动关闭
end: function () { //添加end函数(即结束时的事件函数)
location.href='http://www.baidu.com';
}
});
</script>
</body>
</html>