1. a pop-up box is displayed at the cursor position!
Function showbysite (event) {var element = document. elementfrompoint (event. x, event. y); // get the click object $. messager. showbysite ({Title: 'My title', MSG: 'message. ', showtype: 'show'}, {top: $ (element ). position (). top + $ (element ). height (), // set $. messager. show top is set to left: $ (element) under the clicked object ). position (). left, // set $. messager. show left is set to align with the clicked object bottom: ""});}/*** specifies the position to display $. messager. show * options $. messager. show options * Param = {left, top, right, bottom} */$. extend ($. messager, {showbysite: function (options, Param) {var site = $. extend ({left: "", top: "", right: 0, bottom:-document. body. scrolltop-document.doc umentelement. scrolltop}, Param | |{}); var win =$ ("body> Div. messager-Body "); If (win. length <= 0) $. messager. show (options); win = $ ("body> Div. messager-Body "); win. window ("window" cmd.css ({left: site. left, top: site. top, right: site. right, zindex: $. FN. window. defaults. zindex ++, bottom: site. bottom });}});
2. in the lower right corner of the page, a dialog box is displayed.
$. Messager. show ({Title: "Recommended successfully", MSG: "The news you recommended is: <br/> <span style = \" color: red; \ ">" + newstitle + "</span>", showtype: 'slide', width: 300, height: 150, timeout: 2000 });
Note: If the frame (IFRAME) in the webpage is displayed, the pop-up box will also be in the bottom right corner of IFRAME!