var mdFeas = "center:yes;help:no;scroll:no;status:no;resizable:no;dialogHeight:400px;dialogWidth:550px"; var ret = window.showModalDialog("xxx.html","aa",mdFeas);
<script language="JavaScript"> <!-- function fPopUpCalendarDlg(obj) { var width = 375; var height = 260;
var left = window.screenLeft + obj.offsetLeft + 2; var top = window.screenTop + obj.offsetTop + obj.offsetHeight; if (parseInt((left + width),10) > parseInt(screen.availWidth,10)) left = left - width + obj.offsetWidth - 2; if ((top + height) > screen.availHeight) top = top - height - obj.offsetHeight + 2;
var ret = window.showModalDialog("xxx.html","aa",mdFeas);
<!--
function fPopUpCalendarDlg(obj)
{
var width = 375;
var height = 260;
var left = window.screenLeft + obj.offsetLeft + 2;
var top = window.screenTop + obj.offsetTop + obj.offsetHeight;
if (parseInt((left + width),10) > parseInt(screen.availWidth,10)) left = left - width + obj.offsetWidth - 2;
if ((top + height) > screen.availHeight) top = top - height - obj.offsetHeight + 2;
retval = window.showModalDialog("calendar.html", "日期/时间 属性", "dialogWidth:"+width+"px; dialogHeight:"+height+"px; dialogLeft:"+left+"px; dialogTop:"+top+"px; status:no; directories:yes;scrollbars:no;Resizable=no;"); if( retval != null ) {
obj.value = retval;
}
}
//-->
</script>