Tuesday, April 2, 2013

Refresh div tag content

Below ASP.NET web form uses jquery to change the content inside a div tag.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script type="text/javascript">
    $("#changePanel").click(function() {
    var data = "foobar";
    <style type="text/css">
    div {
    padding: 1em;
    background-color: #00c000;

    input {
    padding: .25em 1em;
    <form id="form1" runat="server">
    <div id="panel">my data</div>
    <input id="changePanel" value="Change Panel" type="button"/>​

No comments:
Write comments
Recommended Posts × +