Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Thursday, March 29, 2012

Binding Data to TD on Page Load using JQuery

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Binding Data to TD on Page Load using JQuery</title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function()
{
    $(function()
    {
        var strDynamicTable="";
        strDynamicTable+="<Table width='100%' cellpadding='0' cellspacing='0'>";
        strDynamicTable+="<Tr>";
        strDynamicTable+="<Td>";
        strDynamicTable+="<Strong>";
        strDynamicTable+="Test Bind Data Dynamically";
        strDynamicTable+="</Strong>";
        strDynamicTable+="</Td>";
        strDynamicTable+="</Tr>";
        strDynamicTable+="</Table>";
        $("#tdBindDataDynamically").html(strDynamicTable);
    });
});
</script>
</head>

<body>
<table width="100%" cellpadding="0" cellspacing="0"><tr><td id="tdBindDataDynamically"></td></tr></table>
</body>

</html>

No comments:

Post a Comment