我想仅显示警报框3秒钟(表示它自动显示和隐藏).我在谷歌搜索很多但没有得到答案.任何建议真的很感激.
我已经完成了新窗口,但仍然找到带警报框的解决方案.Chk我的代码:
function fn() {
var w = window.open('', '', 'width=300,height=2px')
w.document.write('Product has been added to your Order List !')
w.focus()
setTimeout(function () { w.close(); }, 2000);
}
Run Code Online (Sandbox Code Playgroud) javascript ×1