1

java-script を使用してファイルをダウンロードしようとしたときに、次のエラーが発生しました。

エラー:

Internet Explorer cannot download Sample.doc from www.websitename.com.

Internet Explorer was not able to open this Internet site. The request is either unavailable or cannot be found.Please try again later.

HTML:

<html>
<head>
<script type="text/javascript" language="javascript"> 
function winopen() 
{ 
  window.open("Sample.doc","_self","fullscreen=no,toolbar=yes, width=800, height=600, menubar=yes, status=no,scroll=yes"); 
} 
</script>
</head>
<body onload="winopen();">
</body>
</html>

この問題を解決する方法を知っている人はいますか? ありがとう。

4

2 に答える 2

0

それが役立つことを願っています

http://support.microsoft.com/kb/812935

http://support.microsoft.com/kb/316431

于 2011-02-02T09:43:16.057 に答える
0

関数に取得しようとしているリソースの完全な有効な URI を渡す必要がありwindow.openます。例: BBC の Web サイトからスタイルシートをダウンロードするには:

window.open("http://static.bbc.co.uk/homepage/css/bundles/domestic/main.css?661" "_self","fullscreen=no,toolbar=yes, width=800, height=600, menubar=yes, status=no,scroll=yes");

ところで、http: //www.websitename.com にはウェブサイトはありません ;-)

HTH。

于 2011-02-02T11:08:32.797 に答える