The core code is as follows:
/** * IFRAME pop-up layer example: Opendialogbyiframe (550,450, ' new unit ', ' add.do '); * * @param width * Width * @param height * Height * @param tit * Title * @param URL * IFR The URL address of AME is */function opendialogbyiframe (width, height, tit, url) {var winwinth = $ (window). Width (), Winheight = $ (document ). Height (); $ ("Body"). Append ("<div class= ' Yz_popiframediv ' ></div>"); $ ("Body"). Append ("<div class=" Yz_poptanchu ' ><div class= ' yz_poptanchutit ' ><span class= ' yz_poptanchutxt ' > ' + tit+ ' </span>< Span class= ' yz_poptanchuclose ' > Close </span></div><iframe class= ' winiframe ' frameborder= ' 0 ' hspace= ' 0 ' src= "+ URL +" ></iframe></div> "), $ (". Yz_popiframediv "). CSS ({width:winwinth,height:winheight, Background: "#000", Position: "Absolute", left: "0", Top: "0"}), $ (". Yz_popiframediv"). FadeTo (0, 0.5); var yz_ Poptanchuleft = $ (window). Width ()/2-width/2;var Yz_poptanchutop = $ (window). Height ()/2-height/2+ $ (window). scr Olltop (); $ (". Yz_poptanchu"). CSS ({width:width,height:height,border: "3px #ccc solid", Left:yz_poptanchuleft,top:yz_poptanc Hutop,background: "#fff", Position: "Absolute"}), $ (". Yz_poptanchutit"). CSS ({width:width,height: "25px", " Border-bottom ":" 1px #ccc solid ", Background:" #eee "," Line-height ":" 25px "}), $ (". Yz_poptanchutxt "). CSS ({" Text-indent ":" 5px "," float ":" Left "," Font-size ":" 14px "}), $ (". Yz_poptanchuclose "). CSS ({" width ":" 40px "," float ":" Right "," Font-size ":" 12px "," Color ":" #667 "," cursor ":" Pointer "}), var winiframeheight = height-26;$ (". Winiframe "). CSS ({width: Width,height:winiframeheight, "Border-bottom": "1px #ccc solid", Background: "#ffffff"}); $ (". Yz_poptanchuclose"). Hover (function () {$ (this). CSS ("Color", "#334"), and function () {$ (this). CSS ("Color", "#667");}); $ (". Yz_poptanchuclose"). Click (function () {$ (". Yz_popiframediv"). Remove (); $ (". Yz_poptanchu"). Remove ();});
jquery popup iframe window, should be more useful than $.dialog