弹出框提示 四

来源:互联网 发布:阿里云rds创建数据库 编辑:程序博客网 时间:2024/05/22 11:46
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body>
<script src='cf.js' type='text/javascript'></script>

<h1>我的第一段 JavaScript</h1>

<p>
JavaScript 能够对事件作出反应。比如对按钮的点击:
</p>

<button type="button" onclick="alert('Welcome!')">点击这里</button>
<button type="button" onclick="mm()">点击这里</button>

<script>
//在这里编写嵌入html
function moveon() {
//通过弹出一个对话框来询问用户一个问题
    var answer = confirm("准备好了吗?");
    if(answer) window.location = "http:/taobao.com";
}
setTimeout(moveon,6000);
</script>
</body>
</html>
0 0
原创粉丝点击