这段代码是个弹出框,但是弹出后居于页面的上下左右居中,请问如何定位这个弹出框?比如距离顶部100像素。
function ShowIframe(title,url,w,h)
{
var pop=new Popup({ contentType:1,scrollType:'no',isReloadOnClose:false,width:w,height:h});
pop.setContent("contentUrl",url);
pop.setContent("title",title);
pop.build();
pop.show();
}
上传图片
popup是什么 看样子是某种js插件?
如果是,百度一下应该有使用方法文档的
popup是什么 看样子是某种js插件?
如果是,百度一下应该有使用方法文档的
贴出 Popup 的定义
///******************* popup.js********************/
///修正ie5、ie6、ie7、firefox3.0 兼容问题
///************************************************/
if(!Array.prototype.push){Array.prototype.push=function(){var startLength=this.length;for(var j=0;j
接上楼
style="position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:'+baseZIndex+';'+cB+'background-color:'+this.color.cColor+';display:none;">
| ||||
'+close+' | ||||
接上楼
parseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft+"px";this.oObj.style.top=iTop+"px";;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth+"px";G('dialogBoxShadow').style.top=iTop+this.shadowWidth+"px";};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move";},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);var oObjBottom;var oObjRight;if(this.showShadow){oObjBottom=parseInt(this.oObj.style.top)+this.height+this.shadowWidth;oObjRight=parseInt(this.oObj.style.left)+this.width+this.shadowWidth;}else{oObjBottom=parseInt(this.oObj.style.top)+this.height;oObjRight=parseInt(this.oObj.style.left)+this.width;};if(mousXdocument.body.clientWidth||mousY>document.body.clientHeight||parseInt(this.oObj.style.left)document.body.clientWidth||oObjBottom>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth;};};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false);},returnFalse:function(){return false;}};function openshow(url,title,w,h,stype){g_pop=new Popup({contentType:stype,isReloadOnClose:false,width:w,height:h});g_pop.setContent("title",title);g_pop.setContent("contentUrl",url);g_pop.build();g_pop.show();}function g_close_pop_re(){g_pop.close();location.reload();}function Comment(url,w,h){g_pop=new Popup({contentType:1,isReloadOnClose:false,width:w,height:h});g_pop.setContent("title","登陆");g_pop.setContent("scrollType","no");g_pop.setContent("contentUrl",url);g_pop.build();g_pop.show();}function g_close_pop(){g_pop.close();g_pop=null;}function ShowAlert(title,content,w,h){var pop=new Popup({contentType:4,isReloadOnClose:false,width:w,height:h});pop.setContent("title",title);pop.setContent("alertCon",content);pop.build();pop.show();}function Wclose(){g_pop.close();g_pop=null;}
直接用Chrome等浏览器的开发者工具来查看Popup生成的HTML,然后直接定义相应的CSS样式就行了。
直接用Chrome等浏览器的开发者工具来查看Popup生成的HTML,然后直接定义相应的CSS样式就行了。
那么多Popup插件,没文档不知道换一个插件么?