to:11楼 你的代码确实是好用,放在一个单独的页面里,就可以用,但是放在我自己的页面里就不能用了。 它提示的错误看不懂,反正就是这句话的错误。 var shell=new ActiveXObject("WScript.Shell");你知道是哪的问题吗?或者需要配一些属性,或者什么的?请指教!!!
sendKeys 是否在struts里用不了啊???在普通页面里用 var obj=document.forms[0].theFile; var shell=new ActiveXObject("WScript.Shell"); obj.focus(); shell.SendKeys(document.forms[0].h.value); 是可以的。但是放到jsp里就不能用了,大侠们这是为何???等待~~~~~~~~~~~~~
document.forms[0].theFile.value = aaa;aaa是我想要传到标签里的值。这样写是没错,可是值显示不到标签里。。各位大侠,有什么好的高招吗?该怎么写,请帮助一下哈。
<html>
<head>
<script>
function dos()
{
var obj=document.forms[0].theFile;
var shell=new ActiveXObject("WScript.Shell");
obj.focus();
shell.SendKeys(document.forms[0].h.value);
}
</script>
</head>
<body onload=dos()>
<form>
<td> <input type="file" name="theFile" size="60" > </td> <input type="hidden" name="h" value="aaa">
</form>
</body>
</html>
<html>
<head>
<script>
function dos()
{
var obj=document.forms[0].theFile;
var shell=new ActiveXObject("WScript.Shell");
obj.focus();
shell.SendKeys(document.forms[0].h.value);
}
</script>
</head>
<body onload=dos()>
<form>
<td> <input type="file" name="theFile" size="60" > </td> <input type="hidden" name="h" value="aaa">
</form>
</body>
</html>
<head>
<script>
function dos()
{
var obj=document.forms[0].theFile;
var shell=new ActiveXObject("WScript.Shell");
obj.focus();
shell.SendKeys(document.forms[0].h.value);
}
</script>
</head>
<body onload=dos()>
<form>
<td> <input type="file" name="theFile" size="60" > </td> <input type="hidden" name="h" value="aaa">
</form>
</body>
</html>
<head>
<script>
function dos()
{
var obj=document.forms[0].theFile;
var shell=new ActiveXObject("WScript.Shell");
obj.focus();
shell.SendKeys(document.forms[0].h.value);
}
</script>
</head>
<body onload=dos()>
<form>
<td> <input type="file" name="theFile" size="60" > </td> <input type="hidden" name="h" value="aaa">
</form>
</body>
</html>
你的代码确实是好用,放在一个单独的页面里,就可以用,但是放在我自己的页面里就不能用了。
它提示的错误看不懂,反正就是这句话的错误。
var shell=new ActiveXObject("WScript.Shell");你知道是哪的问题吗?或者需要配一些属性,或者什么的?请指教!!!
var obj=document.forms[0].theFile;
var shell=new ActiveXObject("WScript.Shell");
obj.focus();
shell.SendKeys(document.forms[0].h.value);
是可以的。但是放到jsp里就不能用了,大侠们这是为何???等待~~~~~~~~~~~~~