一个这个提示功能的弹出后隐藏,
Alert(pWidth,content);
function Alert(pWidth,content) {
$("#msg").remove();
var html ='<div id="msg" style="position:fixed;top:24%;width:100%;height:10px;line-height:30px;margin-top:-15px; z-index: 99999;"><p style="background:#fff;opacity:0.8;width:'+ pWidth +'px;color:#000;text-align:center;padding:5px 5px;margin:0 auto;font-size:12px;border-radius:4px;border: 1px solid #ccc">'+ content +'</p></div>'
$("body").append(html);
var t=setTimeout(next,2000);
function next()
{
$("#msg").remove();
}
}
pWith是窗口的宽度,content是窗口需要显示的内容,
比如:Alert(1000,"发送验证码成功!");
里面的样式 可以根据