http://www.hbzypx.cn/msg/?id=3944745&member_id=704838
点击
“订单” 或 “留言”按钮
然后发送,发送后怎么叫那个页面消失,数据写入sql,并且提示发送成功!
呵呵
各位大虾有没有好的例子。
谢谢!

解决方案 »

  1.   

    这是那个js文件的部分内容, M_name=document.getElementById("M_UserName").value;
      M_email=document.getElementById("M_UserEmail").value;
      M_phone=document.getElementById("M_UserPhone").value;
      M_count=document.getElementById("M_UserCount").value;怎么才能写到数据库呢?
      

  2.   

    上网搜下 asp.net showmodal
    找下相关资料,看完你就差不多知道怎么做了
      

  3.   

    你见过网上有人用js写的日历控件吗??
    应该和那出不多!!
    iframe+html都在js里写!!
      

  4.   

    http://www.cnblogs.com/Athrun/archive/2008/04/10/1146407.html
      

  5.   

    http://www.cnblogs.com/lovelyxc/articles/158216.html
      

  6.   

    你的那个是div实现的吧,后台保存数据后,可以用如下代码实现
    ClientScript.RegisterStartupScript(page.GetType(), null, "alert('保存成功!'); (div的id).style.visibility=hide; ", true);
      

  7.   

    怎么把我获取的数值
    M_name=document.getElementById("M_UserName").value;
    M_name存到数据库里面去?
      

  8.   

    在是我自己做过的一个例子,现在把一些要用的代码简单帖下。
    在是html代码:
      <td width="10%" bgcolor="#F0F0F0" class="kehu_lianjie2"><a href="#"onclick="window.open('moreProgress.aspx','','width=600,height=450');">查看更多&gt;&gt;</a><br /><a href="#"onclick="window.open('addProgress.aspx','','width=400,height=250');">添加新进度&gt;&gt;</a></td>
    接下来是cs代码:
       protected void Button1_Click(object sender, EventArgs e)
            {
                progress p = new progress();
                progress_bll pb = new progress_bll();
                p.CreateDate = DateTime.Now;
                p.CustomerName = Session["CName"].ToString();
                p.PContent = this.TxtContent.Text.ToString();
                pb.insert_Update_Progress(p,0);
                Response.Write("<script language=javascript>alert('添加成功!');opener.location.reload();window.close();</script>");
            }
      

  9.   


    其实也可以用服务器控件,把服务器控件放在div里,div_订单在按钮点击时出发显示,从服务器控件中读取数据存入数据库应该会吧?存完数据后,直接用response.write写出js让div_订单消失。如果要表单是客户端控件的话,建议用ajax,在.net里用ajax很简单的,在页面里拖入一个ajax scriptmanager然后如下设置
    <asp:ScriptManager ID="ScriptManager1" runat="server">
            <Services>
             <asp:ServiceReference Path="LSoaService.asmx" />
            </Services>
            </asp:ScriptManager> 
    通过webservices来连接后台方法,比如下面的例子:
    <script language=javascript>
    function sortfile(fileid)
    {
      ret=LSoaService.sortfile(fileid,OnComS);
    }
    function OnComS(str)
    {
       alert("归档成功!");
    }
    </script>LSoaService.cs里对应代码是
    [WebMethod]
        public string sortfile(string str)
        {
            int fileid = Int32.Parse(str);
            LSFile lf = new LSFile();
            lf.doctofile(fileid);
            return "a";
        }其中lsfile是处理文件的类,doctofile是数据层的方法。如果出入的参数比较多,可以在客户端通过$或者|等特殊字符连接各参数然后在服务器端再用split分开,我觉得这样挺好用的。