跨框架传值

--单击左侧菜单栏,实现将菜单栏的名称显示在右框架的上框架上 

<script type="text/javascript">

        function ShowTitle(title, showpath) {

            this.parent.frames[3].document.getElementById("lbposition").innerText = "当前位置:" + title;

            this.parent.frames[4].window.location = showpath;
        }
    </script>

 

 

<a href=\"javascript:void(0)\" onclick=\"ShowTitle('" + name1 + "','" + (list1[i].MenuAddress == null ? "#" : list1[i].MenuAddress.ToString()) + "');\">" + name + "</a>
posted @ 2012-06-25 10:29  做最好の自己  阅读(199)  评论(0编辑  收藏  举报