如何改变alert的默认样式

js部分:

       window.onload=function(){
			window.alert=alert;
		}
		
		function alert(e)
		{    //向body里添加一个大的div用作新的弹框
			$("body").append("<div id='msg'><div id='msg_top'></div><div id='contem'><p> 您方案召集申请已提交,后续请等待后台管理员审核审核过后,可在交易大厅看到您的需求</p></div><div id='msg_cont'onclick='cell()'>继续召集方案</div><a href='psd.html' class='msg_close' id='msg_clear'>到个人中心查看</a> </div>");
			$(".msg_close").click(function(){                  
				
				$("#msg").remove();
			});
		}

css样式部分:

          #msg{
			display:inline-block;
			z-index: 999;
			position: fixed;//把大盒子设置固定定位,盒子脱离文档流,位置是固定的,不会随着屏幕窗口滚动
			top:49%px;
			margin-top: -80px;
			margin-left: -133px;
			box-shadow: 5px 5px 8px #EEEEEE;
			right:100px;
			bottom:190px;
			left: 50px;
			margin: auto;
			height: 330px;
			width: 480px;
			text-align: center;
			font-size: 16px;
			color: red;
			/*border: 1px solid yellow;*/
			background-color: #ffffff;
			border-radius: 5px;
			line-height: 2rem;
			padding-bottom: 20px;
			background-image: url(../images/ok_03.png);
			background-repeat: no-repeat;
			background-position: 213px 58px;
		}
		#msg_top{
			background-image: url(../images/bgi_03.png);
			padding: 5px 15px 15px 20px;
			height: 40px;
			text-align: center;
		}
		
		#msg_cont{
			/*margin-top: 240px;*/
			width: 150px;
			border-radius: 5px;
			font-size: 14px;
            border: 1px solid #FFFFFF;
			padding: 15px 20px 20px;
			text-align: center;
			height: 40px;
			float: left;
			text-align: center;
			line-height: 7px;
			background-color: #15AAFB;
			margin-left: 85px;
			cursor: pointer;
		}
		#contem{
			margin: auto;
			/*border: 1px solid black;*/
			width: 396px;
			height:106px;
			
			
			
		}
		#contem p{
			
			margin-top: 100px;
			text-align: center;
			line-height: 23px;
		}
      #msg_clear{
            	border: 1px solid #15aafb;
            	font-size: 14px;
            	width: 150px;
            	height: 40px;
            	display: inline-block;
            	color: #15aafb;
            	padding: 1px 15px;
            	background-color: #FFFFFF;
            	border-radius: 5px;
            	float: right;
            	margin-right: 85px;
            	/*margin-top: 240px;*/
            	cursor: pointer;
            }
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值