1. 程式人生 > >javascript呼叫dll方法

javascript呼叫dll方法

<html>   
<head>   
<title>測試</title>   
<script type="text/javascript">   
function say(){   
  var obj = new ActiveXObject("pubStream.pubCore"); 
  var result = obj.onGetVersion();   
alert(result);   
}   
</script>   
</head>   
<body>   
 
<input type="button" onclick="say()" value="測試">   
</body>   
</html>  


說明

pubStream 是指元件名或者說是dll名稱

pubCore是指dll中的類名

onGetVersion是指類中的方法名