prompt (data,time) {Let alertform= document.createelement (' div '); Alertform.id= "Promptbox"; AlertForm.style.position= "fixed"; AlertForm.style.right= "4%"; AlertForm.style.top= "6%"; AlertForm.style.margin= "0 Auto"; AlertForm.style.width= "300px"; AlertForm.style.height= "50px"; AlertForm.style.background= "#00bb9c"; AlertForm.style.textAlign= "Center"; AlertForm.style.borderRadius= "5px"; AlertForm.style.border= "1px solid #ccc"; AlertForm.style.padding= ' 14px 22px '; AlertForm.style.fontSize= ' 14px '; AlertForm.style.fontFamily= "Microsoft Jas Black"; AlertForm.style.fontWeight= ' normal '; AlertForm.style.color= ' #fff '; AlertForm.style.opacity= '. 8 '; AlertForm.style.zIndex= "10001"; Alertform.innerhtml=data; document.getElementsByTagName ("Body") [0].appendchild (Alertform); SetTimeout (function() {AlertForm.style.display= "None"; },time)}
Write a message box with JS