我想使用 javascript 运行 java 文件。因此借助批处理文件。当尝试遵循它给出的代码时,页面无法显示......你能尽早帮助......
<html>
<head>
<script type="text/javascript">
function compression(str)
{
try{
alert("welcum");
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run (str,1,true);}
catch(e)
{
document.write("erro has occured ");
}
}
</script>
</head>
<body>
<a href="compression('explorer file:///C:\\Documents and
Settings\\test.bat')">batch File</a>
</body>
</html>
--------test.bat file------
@echo off
cls
javac *.java
java LzwTut
pause