您的位置:首页 > Web前端 > JavaScript

js的yes/no确认框

2016-03-06 23:18 1001 查看
如下:

<html>
<body>

<script>
function show_confirm()
{
	var r = confirm("Press a button!");
	if (r)
	{
		alert("yes");
	}
	else
	{
		alert("no");
	}
}
</script>

<input type="button" onclick="show_confirm()" value="test" />

</body>
</html>
靠谱。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: