alert("1111");
console.log("888");
document.write("666");
confirm("666");
var res = prompt("input");
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script type="text/javascript">
alert("1111");
console.log("888");
document.write("666");
confirm("666");
var res = prompt("input");
function getHeigh(){
var h = prompt("input h","191");
if(h!=null){
alert("身高为" + h);
}else{
alert("cancle....")
}
}
</script>
<a href="javascript:getHeigh()">点击获取身高</a>
<input type="button" onclick="getHeigh()" value="提交">
</body>
</html>
输出消息
网友评论