標籤:標示 tip ext osi txt post img error end
<span style="font-size:14px;">function showTips(txt, time, status) {var htmlCon = ‘‘;if (txt != ‘‘) {if (status != 0 && status != undefined) {htmlCon = ‘<div class="tipsBox" style="width:220px;padding:10px;background-color:#4AAF33;border-radius:4px;-webkit-border-radius: 4px;-moz-border-radius: 4px;box-shadow:0 0 3px #ddd inset;-webkit-box-shadow: 0 0 3px #ddd inset;text-align:center;position:fixed;top:25%;left:50%;z-index:999999;margin-left:-120px;"><img src="images/ok.png" style="vertical-align: middle;margin-right:5px;" alt="OK,"/>‘ + txt + ‘</div>‘;} else {htmlCon = ‘<div class="tipsBox" style="width:220px;padding:10px;background-color:#F75058;border-radius:4px;-webkit-border-radius: 4px;-moz-border-radius: 4px;box-shadow:0 0 3px #ddd inset;-webkit-box-shadow: 0 0 3px #ddd inset;text-align:center;position:fixed;top:25%;left:50%;z-index:999999;margin-left:-120px;"><img src="images/err.png" style="vertical-align: middle;margin-right:5px;" alt="Error,"/>‘ + txt + ‘</div>‘;}$(‘body‘).prepend(htmlCon);if (time == ‘‘ || time == undefined) {time = 1500;}setTimeout(function() {$(‘.tipsBox‘).remove();}, time);}<p>}</span></p><p>/*</p><p>該方法可直接複製使用,參數:text 字串 為所提示的資訊文字time 整數 為自己主動消失的時間 單位為毫秒,如:1000status 整數 1和0 為1時為正確資訊提示,背景綠色,圖片標示為?符號。為0時。背景紅色,標示為?紅叉註:因為圖片上傳問題。大家能夠自行尋找圖片16*16</span>歡迎增加Java交流群:398918539</p><p>*/</p>
js簡易美麗的提示框