var w=window.open("login.aspx","_blank","status=no,menubar=no,titlebar=no,toolbar=no"); var obj = w.document.all.TextBox1; if(obj!=null) { alert(obj.value); }
function openw() { aa = window.open("DgGrid/DrageGrid.aspx","_test"); alert(aa.document.all("txt1").value);
}
用session或者cookie或者request.form取值
Dim strScript As String = "<script>" + vbCrLf strScript += "window.parent.returnValue='" + lbxtext.Text.Replace("'", "\'") + "'" + vbCrLf strScript += "window.parent.close()" + vbCrLf strScript += "</script>" + vbCrLf If (Not IsClientScriptBlockRegistered("clientScript")) Then RegisterClientScriptBlock("clientScript", strScript) End If 'MyBody.Attributes.Add("onload", "Form1.yhz.value=window.dialogArguments")
<script language="javascript"> function setmax() { if(typeof document.all!='undefined') if(top.document.body.offsetWidth==screen.availWidth) var ismax=true; if (!ismax) { ismax=true;
{
aa = window.open("DgGrid/DrageGrid.aspx","_test");
alert(aa.document.all("txt1").value);
}
strScript += "window.parent.returnValue='" + lbxtext.Text.Replace("'", "\'") + "'" + vbCrLf
strScript += "window.parent.close()" + vbCrLf
strScript += "</script>" + vbCrLf
If (Not IsClientScriptBlockRegistered("clientScript")) Then
RegisterClientScriptBlock("clientScript", strScript)
End If
'MyBody.Attributes.Add("onload", "Form1.yhz.value=window.dialogArguments")
function setmax()
{
if(typeof document.all!='undefined')
if(top.document.body.offsetWidth==screen.availWidth)
var ismax=true;
if (!ismax)
{ ismax=true;
w=window.open("login.aspx","_blank","status=no,menubar=no,titlebar=no,toolbar=no");
w.moveTo(0,0);
w.resizeTo(screen.width,screen.height);
w.document.getElementById("set1").value="Restore";
window.opener=null;
self.close();
alert(ismax);
}
else
{
ismax=false;
w=window.open("login.aspx","_blank");
w.moveTo(0,0);
w.resizeTo(screen.width/2,screen.height/2);
w.document.getElementById("set1").value="Maximize";
window.opener=null;
self.close();
alert(ismax);
}
}
</script>