js簡易美麗的提示框

來源:互聯網
上載者:User

標籤:標示   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簡易美麗的提示框

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.