<html>
<body>
<script language="JScript">
<!--
function getdrive()
{
var myObject, drive;
myObject = new ActiveXObject("Scripting.FileSystemObject");
drive = myObject.GetDrive("c:\\")
alert("Drive Name of drive C is: " + drive.VolumeName);
}
-->
</script>
Get the name for Drive C.
<form name="myForm">
<input type="Button" value="Get Drive Name" onClick='getdrive()'>
</form>
</body>
</html>
|