You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.5 KiB
57 lines
1.5 KiB
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
|
<HTML>
|
|
<BODY>
|
|
ActiveX测试!<br>
|
|
<script LANGUAGE="Javascript" type = "text/javascript">
|
|
var bLoadSucc = true;
|
|
function fnOnError(){
|
|
bLoadSucc = false;
|
|
}
|
|
function fnOnLoad()
|
|
{
|
|
if(!bLoadSucc){
|
|
alert("控件加载失败");
|
|
}else{
|
|
alert("控件加载成功");
|
|
}
|
|
}
|
|
</script><body onload="fnOnLoad()">
|
|
<OBJECT CLASSID="CLSID:D6EEC694-021D-41F4-8ACF-01D389BBEB37"ID="test" STYLE="LEFT:0;TOP:0" CODEBASE="test.ocx#Version=1,0,0,1">
|
|
</OBJECT>
|
|
|
|
|
|
|
|
<SCRIPT LANGUAGE="Javascript" type = "text/javascript">
|
|
function Play()
|
|
{
|
|
test.StartGame("asdf","进行游戏");
|
|
}
|
|
function Close()
|
|
{
|
|
test.ExitGame();
|
|
}
|
|
if (form1.ss.value == "") {
|
|
alert("失去");
|
|
form1.ss.focus();
|
|
return false;
|
|
}
|
|
|
|
document.onkeydown=function(){
|
|
if (event.keyCode == 13){
|
|
alert('回车键.');
|
|
}
|
|
else{
|
|
alert('你按错了键.');
|
|
}
|
|
}
|
|
|
|
</SCRIPT>
|
|
|
|
<FORM>
|
|
<INPUT NAME="PLAY" TYPE="BUTTON" VALUE="开始侦测" onClick="Play()">
|
|
<input name="ss" type="text" name= "ss" onkeydown="function()"/>
|
|
<textarea rows="" cols=""></textarea>
|
|
<INPUT NAME="STOP" TYPE="BUTTON" VALUE="退出IE" onClick="Close()">
|
|
</FORM>
|
|
</BODY>
|
|
</HTML> |