Home  >  Article  >  Web Front-end  >  IFrame+Js+Div+Css 无刷新修改_html/css_WEB-ITnose

IFrame+Js+Div+Css 无刷新修改_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:29:10907browse

  

 

   
        function DetailShow(linkUrl) {
            var iframeDetails = document.getElementById("iframeDetails");
            iframeDetails.src = linkUrl;
            var divIframeControl = document.getElementById("divIframeControl");
            divIframeControl.style.display = "block";
        }

     
        function DetailHidden(sign) {
            var divIframeControl = document.getElementById("divIframeControl");
            divIframeControl.style.display = "none";
            var iframeDetails = document.getElementById("iframeDetails");
            iframeDetails.src = "";
            if (sign > 0) {
                document.getElementById("hdToBind").value=sign;
                document.getElementsByTagName("form")[0].submit();
            }
        }




 List.cs 文件


    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

    //第一次直接绑定数据
            BindData();
        }
        else
        {

    //如果数据更改就绑定数据 主要是考虑 到服务器事件

            if (Request.Form["hdToBind"].Equals("1"))
            {
                BindData();
            }
        }
    }

.cs 文件

//注册脚本 同样 调用父页面(列表页)方法 告之 数据已经改变 需要重新绑定

ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "window.parent.DetailHidden(1);", true);

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn