ITeye博客

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

yaoweinan · 2011-05-09 10:42 · js · Web前端 · HTML · JavaScript · Markdown

<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>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。