日期:2014-05-16  浏览次数:20305 次

javascript 网页对话框 获取返回参数

<script language="javascript">
function openstr()
{
ReturnValue=window.showModalDialog("b.html",window,"dialogWidth=510px;dialogHeight=150px;status=no");
if(ReturnValue && ReturnValue!="")
{
oOption = document.createElement('OPTION');
oOption.text=ReturnValue;
oOption.value=ReturnValue;
document.all.txtselect.add(oOption);
}
}
</script>


<script language="javascript">
function ClickOk()
{
var t=document.Edit;
var url=t.color.value;
if(url==null||url=="填写颜色") return(false);

window.returnValue=url;
window.close();
}
</script>