The code is not well written. For Beginners, please look at Hai Han and just smile at bojun.
I will write it here as a souvenir, maybe it will be used later.
Effect
CSS
{:;:;:;:;:;}{:;:;:;:;:;:; }{:;:;:;}{:;:;:;}{:;:;:;}{:;:;:;:;:;:;:;:;}{:;}{:;:;:;}{:;:;:;:;}{:;:;:;}{:;:;:;:;}{:;:;:;}{:;}{:;}{:;}{:;}
JS
(Prompt = $ ('<div class = "prompt"> <B class = "left"> </B> <B class = "right"> </B> <B class = "top"> </B> <B class = "bottom"> </B> <div class = "inner"> <I class = "'+ type +' "> </I> <span> '+ text +' </span> <div class =" buttons "> <a class =" OK "href =" # "> Yes </a> <a class = "cancel" href = "#"> NO </a> </div> '). appendTo ('body'-prompt. width ()/2-prompt. height ()/2 '. OK '). bind ('click ''. cancel '). bind ('click'
HTML and usage
Click Show window
Parameter 1 display content
Parameter 2 icon type information success warning
Parameter 3 click the [Yes] event
Parameter 4 click the [No] event
The code is provided here, hoping to help you.
IE transparency uses filter: alpha (opacity = xx). I did not write IE and used chrome's opacity directly. I will add it when I have time. I hope you should pay attention to compatibility with IE when using it.
Click here to download