我自己在sublime中手写代码,对话框怎么就是弹跳不出来了?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>confirm确认对话框</title>
<script>
function rec(){
var mymessage=confirm("你是女生吗?");
if(mymessage==true){
document.write("你是女生!");
}
else{
document.write("你是男生!");
}
}
</script>
</head>
<body>
<input name="button" type="button" onClick="rec()" value="点击我,弹出确认对话框">
</body>
</html>