Js代码
<html>
<head>
<title>测试读卡</title>
<script type="text/javascript">
function say(){
var obj = new ActiveXObject("hello_uo.CallTest");
var value = document.getElementById("username").value;
if (value == null){
value = "administrator";//默认值
}
var result = obj.uo_test(value);
alert(result);
}
</script>
</head>
<body>
<input type="text" name="username">
<input type="button" οnclick="say()" value="打个招呼">
</body>
</html>