单击按钮时隐藏面板的javascript [英] javascript for hide panel on click of button

查看:69
本文介绍了单击按钮时隐藏面板的javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用javascript隐藏面板上的图像按钮



i want to hide panel on click of image button using javascript

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Mail.aspx.cs" Inherits="RecieptGeneration_Mail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">


</head>
<body>
    <form id="form1" runat="server">
    <asp:Panel ID="Panel1" runat="server">


<table>
<tr><td>To:</td><td><asp:TextBox ID="txtTo" runat="server"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:ImageButton ID="ImageButton2" runat="server" Height="19px"

        ImageAlign="Right" ImageUrl="~/images/CloseIco.png" Width="21px" />
    </td></tr>
<tr><td>Subject:</td><td><asp:TextBox ID="txtSubject" runat="server"></asp:TextBox></td></tr>
<tr><td>Body:</td><td><asp:TextBox ID="txtBody" runat="server" TextMode="MultiLine"></asp:TextBox></td></tr>
<tr><td></td><td><asp:FileUpload ID="FileUpload1" runat="server"/></td></tr>
<tr><td></td><td><table id="attachedfiles"></table></td></tr>
<tr><td>
    &nbsp;</td><td><asp:Button ID="btnSend" runat="server" Text="Send" OnClick="btnSend_Click"/></td></tr>
</table>


    </asp:Panel>
    <p>
        &nbsp;</p>
    </form>
</body>
</html>

推荐答案

<script type="text/javascript">


document )。ready( function ()
{
(document).ready(function() {


' #<% = Imagebutton2.ClientID%>')。click( function (){
('#<%= Imagebutton2.ClientID %>').click(function() {


这篇关于单击按钮时隐藏面板的javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆