看一下这个<!-- Dialog用的html -->
<div id="MzBehaviorDragLayer" onmousemove="mousemovehandler(event)" onmouseup="mouseuphandler(event)" style="border: medium none ; margin: 0px; padding: 0px; z-index: 65000; cursor: move; position: absolute; height: 235px; width: 752px; background-image: url(/u/ui/scripts/System/_resource/blank.gif); left: 217px; top: 88px; display: none;" >
<table style="background: transparent url(/u/ui/scripts/System/_resource/dashed.gif) repeat-x scroll left bottom; width: 100%; height: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="background: transparent url(/u/ui/scripts/System/_resource/dashed.gif) repeat-y scroll left top; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 2px; font-size: 1px;"> </td><td style="background: transparent url(http://topic.csdn.net/u/ui/scripts/System/_resource/dashed.gif) repeat-x scroll left top; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"> </td><td style="background: transparent url(/u/ui/scripts/System/_resource/dashed.gif) repeat-y scroll right top; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 2px; font-size: 1px;"> </td></tr></tbody></table>
</div>
<div id="MzBehaviorDragLayer" onmousemove="mousemovehandler(event)" onmouseup="mouseuphandler(event)" style="border: medium none ; margin: 0px; padding: 0px; z-index: 65000; cursor: move; position: absolute; height: 235px; width: 752px; background-image: url(/u/ui/scripts/System/_resource/blank.gif); left: 217px; top: 88px; display: none;" >
<table style="background: transparent url(/u/ui/scripts/System/_resource/dashed.gif) repeat-x scroll left bottom; width: 100%; height: 100%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="background: transparent url(/u/ui/scripts/System/_resource/dashed.gif) repeat-y scroll left top; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 2px; font-size: 1px;"> </td><td style="background: transparent url(http://topic.csdn.net/u/ui/scripts/System/_resource/dashed.gif) repeat-x scroll left top; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"> </td><td style="background: transparent url(/u/ui/scripts/System/_resource/dashed.gif) repeat-y scroll right top; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 2px; font-size: 1px;"> </td></tr></tbody></table>
</div>
my_form.style.display="";
if(opts['title'])
titlebar.innerHTML=opts['title'];
var width=600;
var height=400;
if(opts['width'])
width=parseInt(opts['width']);
bglayer.style.width=""+width+"px";
my_form.style.width=bglayer.style.width;
content.style.width=""+(width-32)+"px";
draglayer.style.width=bglayer.style.width;
if(opts['height'])
height=parseInt(opts['height']);
bglayer.style.height=""+height+"px";
my_form.style.height=bglayer.style.height;
content.style.height=""+(height-60)+"px";
draglayer.style.height=bglayer.style.height;
lockwin.style.display="";
var l=GetScrollXY().x+(document.body.clientWidth-parseInt(width))/2.0;
var t=GetScrollXY().y+(document.body.clientHeight-parseInt(height))/2.0;
draglayer.style.left=my_form.style.left=""+l+"px";
draglayer.style.top=my_form.style.top=""+t+"px";
lockwin.style.left=""+GetScrollXY().x+"px";
lockwin.style.top=""+GetScrollXY().y+"px";
if(opts['url']){
var frameContent=content.getElementsByTagName("IFRAME")[0];
frameContent.style.height=""+(height-60)+"px";
content.getElementsByTagName("IFRAME")[0].style.display="block";
content.getElementsByTagName("DIV")[0].style.display="none";
try{content.getElementsByTagName("IFRAME")[0].src=opts['url'];}catch(ex){}
}
if(opts['html']){
content.getElementsByTagName("IFRAME")[0].style.display="none";
content.getElementsByTagName("DIV")[0].style.display="block";
content.getElementsByTagName("DIV")[0].innerHTML=opts['html'];
}
}
看看我写的这个把。