我做的是一个添加功能,一个div以模式窗体的效果打开的,首先这个div是隐藏的,当点击添加按钮,这个div以模式窗体的效果打开,里面有个服务器端提交按钮btn_mediaName,我点击他,死活不提交跟客户端button一样。后来我测试,如果这个div开始是显示的话,btn_mediaName又可以完整不误的提交到后来执行方法。很是纠结啊,求高手帮忙解决下。。这是div的代码 <div id="addChannel" style="position:absolute;filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#ffffff,endColorStr=#003366); border-color:White;  border:2px solid; left:40%;top:30%;width:280px; height:230px; display:none; z-index:2;">
        <div style="width:280px;height:25px; text-align:left; background-color:#A2B5CD; line-height:25px;">频道添加窗口</div>
        <div style="width:280px; height:25px; margin-top:50px; line-height:25px;">
            <div style="height:25px;width:100px; float:left; text-align:center;">媒体名称:</div>
            <div style="height:25px;width:180px; "><input id="btn_mediaName" type="button" value ="请选择" style="width:100px;" onclick="open_selectMedia()" />
                                                    <asp:HiddenField ID="HiddenField1" runat="server" />
            </div>
        </div>

解决方案 »

  1.   

    OnClientClick="func();return false;" 
      

  2.   

    不好意思,后来还有代码,接着上面的,都在一个DIV中
      <div style="width:280px; height:50px; margin-top:15px;">
                <div style="height:25px;width:150px; float:left; text-align:center;">
                    <asp:Button ID="btn_add" runat="server" Text="完成设置" onclick="btn_add_Click" /></div>
                <div style="height:25px;width:130px;  "><input type="button" value ="取消" style="width:80px;" onclick="close_div_channel()" /></div>
            </div>
        </div>
    我想提交的是btn_add 这个按钮,他死活提交不了