用XML+FSO+JS实现服务器端文件的选择效果

2018-12-29 19:12:48王冬梅

td{font-size:9pt}
body{font-size:9pt}
.file A{COLOR: #000000; TEXT-DECORATION: none;font-size:9pt}
.file A:visited{COLOR: #000000; TEXT-DECORATION: none;font-size:9pt}
.file A:hover {COLOR: #000000; TEXT-DECORATION: none;font-size:9pt}
</style>
</HEAD>

<BODY style="margin: 0pt">

</BODY>
</HTML>
     调用的时候用以下函数,就可以实现以假乱真的服务器端选择文件的效果
function selectfile()
{
var arr = showModalDialog("selectfile.asp?temp="+Math.random(), "", "dialogWidth:453px; dialogHeight:252px; status:0;help:1");
  if (arr != null)
  {
   return arr
  }
}
       该函数最后返回的是选中的文件名,函数里面所使用的几张图片大家就自已从文件选择框上抓了:)