Implement js call pop-up window and js call pop-up window
<Span style = "font-size: 14px;"> // Html code: Click the control to call the "recipient pop-up window". <! DOCTYPE html>
[Corresponding user. js]
$ (Function () {/* select the user */$ ('. user-group '). on ('click ','. user-add', function () {div = $ (this ). parent ('div. user-group '); box = $ (this ). next ('div. user-gather '); single = (typeof (div. attr ('data-multi ') = 'undefined'); window. top. art. dialog. open ('base/user/index/dialog? Single = '+ (single), {// call the corresponding dialog page style title: 'select' + (single? 'Yi': 'duo') + 'colleague ', width: 480, height: 440, lock: true, OK: function () {users = this. iframe. contentWindow. $ (". active "); users. each (function (I, dom) {id = $ (dom ). attr ('data-uid'); if (div. find ('div [data-uid = '+ id +'] '). length) {window. top. art. dialog. tips ('Do not repeat add'); return;} input = '<input type = "hidden" name = "' + div. attr ('data-form') + '"value ="' + id + '">'; $ (dom ). append (input); if (single) {box.html (dom. OuterHTML) ;}else {box. append (dom. outerHTML) ;}window. top. art. dialog. tips ('add') ;}); if (! Single) return false ;}, cancel: true}) ;});/* delete a user */$ ('. user-group '). on ('click ','. user-event', function () {if (confirm ('Are you sure you want to delete this user') {$ (this ). remove () ;}});/* restore user */$ ('. user-group '). each (function (I) {var _ this = this; var _ data = $ (_ this ). attr ('data'); var _ edit = $ (_ this ). attr ('data-form'); if (_ edit) $ (_ this ). append ('<div class = "user-add user-item"> <p> <I class = "glyphicon-user"> </I> </p> click to select </div> '); $ (_ this ). append ('<div class = "user-gather"> </div>'); if (_ data & _ data! = 0) {$. each (_ data. split (','), function (I, id) {if (! Id) return; $. getJSON (window. top. site_url + 'base/user/query? Id = '+ id, function (json) {if (! Json) return; var _ html = '<div class = "user-item' + (_ edit? 'User-event': '') + '" data-uid = "' + id + '" data-name = "' + json. realname + '">'; if (_ edit) _ html + = '<input type =" hidden "name ="' + $ (_ this ). attr ('data-form') + '"value ="' + id + '"> '; _ html + = '<p> </p> '+ json. realname; _ html + = '</div>'; $ (_ this ). find ('. user-gather '). append (_ html );});});}});});
[Corresponding dialog Page]
<! DOCTYPE html>
[Effect Preview]
How can I implement a pop-up window by calling a js on the entire site?
I used to do this. It is very convenient to modify the advertising space and code in the future,
1. Get an advertisement code. You must have it,
2. Open an advertisement location in the background: Background ----- module --- Advertisement Management
3. The code is displayed after the advertisement is launched :.
4. Put the code in: templets/defaults/footer.htm
Code for calling the pop-up AD Alliance using js files
Hello, the correct syntax is as follows: document. writeln ("<script type = text/javascript> ");
Document. writeln ("u_a_client = \" 1954 \";");
Document. writeln ("u_a_width = \" 0 \";");
Document. writeln ("u_a_height = \" 0 \";");
Document. writeln ("u_a_zones = \" 1958 \";");
Document. writeln ("u_a_type = \" 1 \"");
Document. writeln ("</script> ");
Document. writeln ("<script src = \" js.a3p4.com/ I .js\ "> </script> ");
Document. writeln ("");