Js simple and beautiful prompt box, js
<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; "> '+ 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; "> '+ txt +' </div> ';} $ ('body '). prepend (htmlCon); if (time = ''| time = undefined) {time = 1500;} setTimeout (function () {$ ('. tipsbox '). remove () ;}, time );} <p >}</span> </p> <p>/* </p> <p> This method can be directly copied and used. parameters: the text string is the prompt message. The text time integer is the time unit of automatic disappearance in milliseconds. For example, if the value of 1000 status integer 1 and 0 are 1, the message is displayed correctly. The background is green, the image is marked as a symbol. If it is 0, the background is red. Note: Due to image uploading problems, you can search for images 16*16 by yourself. </span> welcome to the Java discussion group: 398918539 </p> <p> */</p>
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.