| 首页 >> 网络编程 >> XML >> XML应用 >> 新闻正文 | [字体:大 中 小] [打印文档] |
| |
|
|
<tr> <td align="right">文件类型(<u>T</u>):</td> <td><select name="select2" class=s2> <option>流媒体文件(*.asf,*.wmv,*.wma)</option> </select></td> <td><input type="button" name="Submit" value=" 取消 " onclick="window.close();"></td> </tr> </table></td> </tr> </table> </BODY> </HTML> 里面还有一个小文件blank.htm用来定义文件和文件夹显示的样式 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <style> 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 } } 该函数最后返回的是选中的文件名,函数里面所使用的几张图片大家就自已从文件选择框上抓了:) |
