自己写了一个ATL<BODY>
<object id = "renderControl" classid = "clsid:5BB9D7C7-60A5-4110-89E5-349B1C29151E" height= "300" 
    width="600" codebase ="http://localhost/WebServiceWeb/Cab1.CAB" name="renderControl">
</object>
<script type ="text/javascript">
var path=location.href;   
path=path.substring(0,path.lastIndexOf("/")+1);
path=path.substring(0,path.length-2);
path=path.substring(0,path.lastIndexOf("/")+1);
var picPath = path+"\WebServiceWeb\\picture.jpg";
var demPath = path+"\WebServiceWeb\\res.dem";
alert("\WebServiceWeb\\picture.jpg");
renderControl.TextureURL="\WebServiceWeb\\picture.jpg";         renderControl.TerrainURL="res.dem"; 
alert(renderControl.TextureURL);
         renderControl.InitRender();
         renderControl.StartRender();   
//renderControl.Test1();
</script>
<input type=button value="Scan" onclick=showATL() class="Field"></td>
<img id="111" src="\WebServiceWeb\picture.jpg"  />
</BODY>需要明确的是 path返回的是"http://localhost"alert("\WebServiceWeb\\picture.jpg");
输出"http://localhost\WebServiceWeb\picture.jpg"
再赋值以后
alert(renderControl.TextureURL);
输出""(也就是什么也没有,导致后续的调用出错)本人做WEB开发的经验很少,所以遇到这样的问题也不知道是怎么回事参考::
我在C/S里面做的是没有问题的,C#开发的Form程序
RenderControl rc = new RenderControl();
re.TextureURL = <绝对路径>;
renderControl.InitRender();
renderControl.StartRender();   
可以实现功能推测::
是否是因为JS调用ActiveX只能调用方法呢?