var myAlert = {
alertbox : function(alertContent){
// var windowWidth = window.innerWidth;
// windowHeight = window.innerHeight;
var alertContainer = document.createElement("div")
alertContainer.innerHTML =
`
<div id='myAlertBox' style='position: absolute; left: 0px; top: 0px; width: 100%; z-index: 9999; height: 568px;'>
<div style="position: absolute; left: 0px; top: 0px; width: 100%; background: rgba(0, 0, 0,1); opacity: 0.5; z-index: 9999; height: 568px;"></div>
<div style="position: absolute; width: 327px; height: 278px;background: #fff; border-radius: 20px;overflow: hidden;z-index: 10000; left: 50%; top: 50%; transform: translate(-50%, -50%);padding:25px">
<div style='width:100%;height: 20px;font-size: 20px;color: #282828;text-align:center;'>服务协议与隐私政策</div>
<div style='width:100%;height: 127px;font-size: 13px;color: #282828;text-align:left;margin-top:18px;'>欢迎使用爱鲸准APP,在你使用爱鲸准APP服务前,请认真阅读《服务协议》和《隐私协议》全部条款。我们非常重视您的用户权益与个人信息的保护,我们将通过上诉协议向你说明我们如何为你提供服务并保障你的用户权益,如你同意,请点击“同意并继续”接受我们的服务。</div>
<div style='width:100%;height: 12px;font-size: 12px;color: #909090;text-align:center;'>不同意并退出</div>
<div style='width: 121px;height: 28px;line-height: 28px;font-size: 13px;text-align:center;margin-top:12px;color: #ffffff;background-color: #0983f8;border-radius: 14px;margin-left:79px;margin-top:20px'>同意并继续</div>
</div>
</div>
`
document.body.appendChild(alertContainer)
// closeButton = document.getElementById("closeBox")
// console.log(closeButton)
// closeButton.onclick = function(){
// document.body.removeChild(document.getElementById("myAlertBox"));
// }
}
}
myAlert.alertbox()
版权声明:本文为who_become_gods原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。