<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
function testAlert(){
alert("this is a test alert");
}
//testAlert();
function testConfirm(){
//var c = confirm("msg");
//console.log(c);
if(confirm("删除?")){
alert("删除成功!")
}
}
//testConfirm();
function testPrompt(){
//直接点击关闭或是取消 会返回null
var username = prompt("用户名","zhangsan");
console.log(username);
}
testPrompt();
</script>
</head>
<body>
</body>
</html>