2011-02-02 2 views
1

java-script를 사용하여 파일을 다운로드하는 중 다음 오류가 발생했습니다.javascript를 사용하여 doc 파일을 다운로드하는 방법

ERROR :

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> 

사람이이 문제를 해결하는 방법을 알고 있나요? 감사합니다. .

답변

0

는 내가 그것을 당신은 당신이 window.open 기능에 도착하려는 자원의 전체 유효한 URI를 전달해야

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

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

+0

help.i를 주셔서 감사합니다. 기사별로 있지만 오류는 계속 발생합니다. – Sukhjeevan

+0

@sukhi 코드가 다른 브라우저에서 작동하는지 여부를 알려주세요. 나는 그것이 모질라, 오페라 또는 crome에서 일하고 있다는 것을 의미합니까? – enthusiastic

+0

그 모질라에서 일하고. – Sukhjeevan

0

도움이되기를 바랍니다. 예. 영국 BBC의 웹 사이트에서 스타일 시트를 다운로드하려면

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"); 

은 BTW http://www.websitename.com ;-)

HTH에서 어떤 웹 사이트가 없습니다.