需求说明:
单击“半闭”按钮时,关闭当前页面购物车页面
单击“移入收藏”弹出收藏提示
单击“删除”弹出确认删除提示
单击“结算”按钮,弹出结算信息页面窗口
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>制作简易的当当购物车页面</title>
<link type="text/css" rel="stylesheet" href="css/cartStyle.css" />
<script type="text/javascript">
function Delete(){
var a = confirm("确定要删除吗?");
if(a==true){
alert("删除成功")
}else{
alert("已取消")
}
}
function collect(){
var b = alert("已收藏")
}
function custom_close() {
if (confirm("您确定要关闭本页吗?")) {
window.close()
} else {
}
}
function settle(){
window.open("shopping02.html");
}
</script>
</head>
<body>
<div class="content">
<div class="logo">
<img src="images/dd_logo.jpg"><span><type="button" value="关闭" onClick="custom_close()"> 关闭</span>
</div>
<div class="cartList">
<ul>
<li onclick="collect()"/>移入收藏</li>
<li onclick="Delete()"/>删除</li>
<li onclick="collect()"/>移入收藏</li>
<li onclick="Delete()"/>删除</li>
<li onclick="settle()"/><span>结算</span></li>
</ul>
</div>
</div>
</body>
</html>