<html> 
    <body> 
    <script language="JScript"> 
    <!-- 
    function getExt() 
    { 
        var myObject, ext; 
        myObject = new ActiveXObject("Scripting.FileSystemObject"); 
        ext = myObject.GetExtensionName("c:\\test.txt"); 
        alert("The extension for the testing file is: " + ext); 
    } 
    --> 
    </script> 
    Get the extension for the file "testing.txt". 
    <form name="myForm"> 
    <input type="Button" value="Get Extension" onClick='getExt()'> 
    </form> 
    </body> 
    </html>
  |