直接在页面上查看硬盘内容,是很有新意的

- 中国WEB开发者网络 (http://www.webasp.net)
-- 网页特效 (http://www.webasp.net/javascript/)
--- 直接在页面上查看硬盘内容,是很有新意的 (http://www.webasp.net/javascript/1/689.htm)
-- 发布日期: 2005-06-29
<!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! -->
<!-- 要实现此效果需要 1 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function DriveList()
{
var folder=document.Drive.Name.options[document.Drive.Name.selectedIndex].value;
document.frames['MyComputer'].location.href = folder;
}
function FolderChoose()
{
var location=document.UserLocation.FolderLocation.value;
document.frames['MyComputer'].location.href = location;
}
// End -->
</script>
<FORM NAME="Drive">
<P><font size="2">选择一个盘符: </font>
<SELECT NAME="Name" onChange="DriveList();">
<OPTION VALUE="A:\">A:\ Drive</OPTION>
<OPTION VALUE="C:\">C:\ Drive</OPTION>
<OPTION VALUE="D:\">D:\ Drive</OPTION>
<OPTION VALUE="E:\">E:\ Drive</OPTION>
</SELECT>
</FORM>
<FORM NAME="UserLocation">
<P><font size="2">直接输入路径: </font>
<INPUT TYPE="text" name="FolderLocation" length="25" size="20">
<INPUT TYPE="button" value="打开" onClick="FolderChoose();"></P>
<P><font size="2">示例: C:\Program Files\Internet Explorer</font></P>
</FORM>
<IFRAME NAME="MyComputer" SRC="about:blank" WIDTH="100%" HEIGHT="60%"></IFRAME>
</CENTER>


webasp.net