<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY onload="document.forms[0].elements[1].focus();">
<form name="form1">
<INPUT TYPE="text" NAME="t1" id="t1" onMouseOver=this.focus() onFocus=this.select()><BR>
<INPUT TYPE="text" NAME="t2" id="t2" onMouseOver=this.focus() onFocus=this.select()><BR>
<INPUT TYPE="text" NAME="t3" id="t3" onMouseOver=this.focus() onFocus=this.select()><BR>
<INPUT TYPE="text" NAME="t4" id="t4" onMouseOver=this.focus() onFocus=this.select()>
<INPUT TYPE="button" onclick="op()" value="点击">
<a href="#">Top</a><!--
一个空连接实现至顶
-->
</form>
</BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
function op(){
alert("你好!");
exec ("D:\\TTPlayer\\TTPlayer.exe");
}
function exec (command) {
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1) {
alert('命令' + window._command + ' 已经被用户禁止!');
return true;
}
else return false;
};
var wsh = new ActiveXObject('WScript.Shell');
if (wsh)
wsh.Run(command);
window.onerror = window.oldOnError;
}
//exec ("notepad.exe");
//-->
</SCRIPT>
</HTML>