首页 > 其他 > 详细

确认对话框 演示

时间:2015-03-04 16:44:33      阅读:218      评论:0      收藏:0      [点我收藏+]
<html>
	<head>
		<title>确认对话框 演示</title>
	</head>
	<style>
		div{font-size:30px;}
	</style>
	<script>
function testConfirm(){
	var confirmed = window.confirm("真的要删除对象吗?");
	if(confirmed){
		document.getElementById("msg").innerHTML = 
			"删除成功!";
	}
}
function testPrompt(){
	var msg = window.prompt("输入信息:");
	document.getElementById("msg").innerHTML = msg;
}
	</script>
	<body>
		确认对话框 演示:
		<input type="button" value="测试确认框" 
			onclick="testConfirm()">		
		<input type="button" value="测试输入框" 
			onclick="testPrompt()">
		<div id="msg"></div>
	</body>
</html>

  

 

 

确认对话框 演示

原文:http://www.cnblogs.com/a757956132/p/4313514.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!