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>

你可能感兴趣的:(JavaScript,html)