Sunday, 9 December 2012

jQuery empty() and remove() methods by Example in ASP.NET

<html xmlns="">
<head runat="server">
    <title>jQuery empty() and remove() methods by Example</title>
    <script src="" type="text/javascript"></script>
    <style type="text/css">
            margin-right: 15px;
            width: 80px;
    <form id="form1" runat="server">
    <h4 style="color: Green">
        jQuery empty() and remove() methos example</h4>
    <div id="firstDiv" style="border: 1px solid Red;">
        I am First Div
        <div id="innerDiv">
            I'm a inner Div
        <asp:Button ID="btnEmpty" runat="server" Text="Empty" class="btn"
            CssClass="btn" />
        <asp:Button ID="btnRemove" runat="server" Text="Remove" class="btn" />
        <asp:Button ID="btnReset" runat="server" Text="Reset" class="btn" />
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnReset").click(function () {
                alert("Div content after empty/Remove: " + $("#firstDiv").html());
                return false;

            $("#btnEmpty").click(function () {
                return false;

            $("#btnRemove").click(function () {

                return false;


No comments:

Post a Comment

© 2012-2018 All Rights Reserved.
The content is copyrighted to Kishore and may not be reproduced on other websites without permission from the owner.