1. 程式人生 > >HTML彈出確認框

HTML彈出確認框

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
	function openResult(){    /* 繫結事件 */
		var r = confirm("親,您確定取消該訂單嗎?")
		if (r == true) {
		window.location.href="登入頁面.jsp"
		} else {
			
		}
	} 
</script>
</head>
<body>
	<input type="button" onclick="openResult()" value="退出"/>
</body>
</html>