首页 新闻 赞助 找找看

如果你正处于进程当中,信息有可能丢失

0
悬赏园豆:30 [已关闭问题]

在点击保存时 IE 总是关闭 ("如果你正处于进程当中,信息有可能丢失")

如果想测试 相关的几个页面还没有处理过

我的ie是 7.0

show_word() 这个运行没有问题

当程序运行完Submit_upload_onclick 就出以上问题了

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript">
        function show_word()
        {
            var str=window.location.search;
//            var pos_start=str.indexOf("id")+3;
//            if(pos_start==2)
                return ;
            var id = "http://localhost/Getdc.aspx?id=" + str.substring(pos_start);
            document.all.MyOffice.Open(id,false ,"Word.Document");
        }
        function Submit_upload_onclick()
        {
//            var str=window.location.search;
            var str ="id=1";
            var pos_start=str.indexOf("id")+3;
//            if (pos_start == 2)
//            return ;

            document.all.MyOffice.HttpInit();
            document.all.MyOffice.HttpAddPostCurrFile("File", "");
            var id = "http://localhost/Savedc.aspx?id=" + str.substring(pos_start);
            document.all.MyOffice.HttpPost(id);
        }
    </script>
</head>
<body onload="show_word();">
    <form id="form1" runat="server">
    <div>
    <object id="MyOffice" name="MyOffice"  style="left: 0px; width: 100%; top: 0px; height: 100%" classid="clsid:00460182-9E5E-11D5-B7C8-B8269041DD57" codebase="dsoframer.ocx#version=2,2,0,0" ></object>
    <input id="Button1" type="submit" value="保存" onclick="return Submit_upload_onclick()" />
    <input type="file" name="File" id = "File"/>
    </div>
    </form>
</body>
</html>

湖的主页 | 初学一级 | 园豆:0
提问于:2009-04-02 15:06
< >
分享
其他回答(1)
0

onclick="return Submit_upload_onclick()" />
这句貌似得写成onclick="Submit_upload_onclick()"

子夜星辰 | 园豆:1613 (小虾三级) | 2009-04-02 16:18
0

onclick="return Submit_upload_onclick()"

return 了什么呢

jeff_sh | 园豆:365 (菜鸟二级) | 2009-04-07 14:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册