Js|window
Fireform.htm: Click the "Upload" button to eject the internal window (ShowModalDialog), the code is as follows:
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> Untitled Document </title>
<script language= "JavaScript" >
function Onobjmore (url,name,height,width,formname) {
Window.alert (FormName.file.type);
var feature = "Dialogwidth:" +width+ "Px;dialogheight:" +height+ "px;scroll:yes;status:no;help:no;center:1";
var returntarget = window.showmodaldialog (URL, name, feature);
if (returntarget!= undefined && returntarget.length > 1) {
Document.location = Returntarget;
Formname.file.value=returntarget;
}
return false;
}
</script>
<link href= "Css/aljoin.css" rel= "stylesheet" type= "Text/css" >
<body>
<form name= "Proform" method= "POST" action= "" >
<table width= "border=" 0 "cellpadding=" 0 "cellspacing=" 0 ">
<tr>
<TD width= "height=" style= "white-space:nowrap" nowrap> file </td>
<TD width= "307" height= "><input name=" "File" type= "text" id= "file" ></td>
</tr>
<tr>
<TD height= > </td>
<TD height= "><input type=" button "name=" Submit "value=" Upload file "></td>
</tr>
</table>
</form>
</body>
Upfile.htm: Click on the "Close" button to return the Window.returnvalue value to opener, the code is as follows:
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> Untitled Document </title>
<script language= "JavaScript" >
function exit () {
Window.returnvalue = "Images/upload/2004080512.jpg";
Window.close ();
}
</script>
<body>
<input name= "" type= "button" value= "Close Window" >
</body>