<script language=javascript>
function saveword(){
var file = document.getElementById("file1").value;
var wrd=new ActiveXObject("Word.Application")
wrd.visible=true
//wrd.Documents.Open("d:\mydoc.doc")
wrd.Documents.Open(file)
wrd.Application.Activate()
wrd.ActiveDocument.SaveAs("d:\word2.htm", 8)
wrd.quit();
wrd=null
}
</script> <FORM action="shuangchuan_process_do.jsp" method="post" enctype="multipart/form-data" onsubmit="saveword()">
<input type="file" name="file1" style="width:200px;" id="file1"/>
</form>
这个功能是在提交上传doc文件的时候,把上传文件转htm文件。大家帮我看看这个怎么有错误,很急
小弟谢谢了
function saveword(){
var file = document.getElementById("file1").value;
var wrd=new ActiveXObject("Word.Application")
wrd.visible=true
//wrd.Documents.Open("d:\mydoc.doc")
wrd.Documents.Open(file)
wrd.Application.Activate()
wrd.ActiveDocument.SaveAs("d:\word2.htm", 8)
wrd.quit();
wrd=null
}
</script> <FORM action="shuangchuan_process_do.jsp" method="post" enctype="multipart/form-data" onsubmit="saveword()">
<input type="file" name="file1" style="width:200px;" id="file1"/>
</form>
这个功能是在提交上传doc文件的时候,把上传文件转htm文件。大家帮我看看这个怎么有错误,很急
小弟谢谢了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货