纯js的右下角弹窗实例代码
function pop_init(title,content) {
//取当前浏览器窗口大小
var windowWidth=$(document).width();
var windowHeight=$(document).height();
//弹窗的大小
var weight=320;
var height=240;
$("body").append(
"
"+
"
" +
"
"+title+"
×
" +"
"+"
" +"
" +
content+
"
"+"
");
}
function pop_close(){
$('#pop_p').fadeOut(400);
}
$(document).ready(function(){
pop_init("公告信息","
- sss
- sss
$('#pop_p').fadeIn(400);
});登录后复制