解决方案 »

  1.   

    http://springjava.iteye.com/blog/519048
      

  2.   

    用div代替window.open。
    实际上window.open经常被浏览器拦截,不太喜欢用
      

  3.   

    点击打钩弹出一个div,用js将你的勾不打, 在div里确定做的点击事件。里面点确定触发将勾打上
      

  4.   

    你目前情况要用1楼的解决方案。但是你这种做法可能过时了,现在流行的做法是2#和4#的做法。用div的情况下,子页面是父页面的一部分,”确定“按钮和主页面的表哥在同一个页面内,用基本dom操作就可以了。
      

  5.   

    JS和C#之间的互相调用与访问
    //C#声明的变量
        public string Str = "C# variable";    //C#声明的方法
        public string GetStr(string str)
        {
            return str + Str;
    }
    //使用JS脚本访问C#变量和方法
    <script language="javascript" type="text/javascript">
            function CallCSVariable()
            {
                alert("<%= Str %>");
            }
            
            function CallCSMethod()
            {
                alert('<%= GetStr("this is a ") %>');
            }
            
        </script>
    //JS设置隐藏字段的值
    <script language="javascript" type="text/javascript">
            function SetHidden()
            {
                document.getElementById("Hidden1").value = "javascript set value";
            }
        </script>
    //C#隐藏字段
    protected void btnCallJavaScript_Click(object sender, EventArgs e)
        {
            //必须将Hidden放在Form中
            Response.Write(Hidden1.Value);
        }
    //使用C#字典对象绑定控件
    protected void Page_Load(object sender, EventArgs e)
        {
            //创建字典对象
            Dictionary<string,string> colorDict = new Dictionary<string,string>();
            colorDict.Add("red","红色");     //添加字典项
            colorDict.Add("blue", "蓝色");
            colorDict.Add("green", "绿色");
            colorDict.Add("yellow", "黄色");
            Repeater1.DataSource = colorDict;//将字典对象绑定到Repeater
            Repeater1.DataBind();
        }//CodeGo.net/
    //使用<%#%>标记访问对象
    <asp:Repeater ID="Repeater1" runat="server">
                <HeaderTemplate><table></HeaderTemplate>
                
                <ItemTemplate>
                    <tr>
                        <td>
                            <%# Eval("Key") %>
                        </td>
                        <td>
                            <%# Eval("Value") %>
                        </td>
                    </tr>
                </ItemTemplate>            
                
                <FooterTemplate></table></FooterTemplate>
            </asp:Repeater>
      

  6.   

    我感觉你可以使用window.arguments来在子界面操作父窗体的控件,父页面  var   objwin   =   window.open('index.asp',"OAMAIN","toolbar=0,location=0,directories=0,
    status=0,menubar=0,scrollbars=0,resizable=0,width="   +   w   +   ",height="   +   h   +   ",
    top=0,left=0",true);  子页面:with(window.arguments){获取父页面控件}
      

  7.   

    子页面 
        window.opener.getElementById('你的复选框id').checked = true 不过就像 2 楼所说, window.open 经常被拦截, 用户体验也不够友好, 不建议使用, 推荐使用 <div> 
      

  8.   


    你把值传回父窗口  ,那我怎么把指定的那个checkbox给打勾?
      

  9.   

    移步》http://bbs.csdn.net/topics/390883038#post-398164625
      

  10.   

    window.opener是指的你的父页面的DOM,你可以用IE的F12调试功能,查看window.opener对象下具体的对象,再根据实际情况去查找你要的checkbox去做操作。
      

  11.   

    在父页面写一个让checkbox选中的方法xxx(id),然后子页面关闭的的时候onclose的时候调用父页面的那个选中的方法,winodw。parent。xxx(id);
      

  12.   


    对象不支持“getElementById”属性或方法