标签:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
function a(){
var b=confirm("是否确定")//按确认和取消输出不同的内容
if(b==true){
document.write("you pressed ok!")
// f();
}else{
// document.write("you pressed cancel!")
}
}
function b(){
// var c=prompt(‘请输入‘);
var c=prompt(‘请输入‘,‘ss‘);
alert(c);
// alert(parseInt(c));
// alert(typeof(c));
// document.write(c);
}
function f(){
alert(1111);
}
</script>
<input type="button" onclick="a()" value="aaaa"/>
<input type="button" onclick="b()" value="bbbb"/>
</body>
</html>
标签:
原文地址:http://www.cnblogs.com/huangyongyong/p/5966142.html