mukesh kumar
unread,May 8, 2013, 6:10:48 AM5/8/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to googl...@googlegroups.com
<body>
hi buddy,
i want to print the div content using JSON.stringify() in json form....but doesn't show the required result.like:
{"data":"HCL TECH","children":[{"data":"SW_TowerA","attr":{"rel":"file"}},{"data":"TowerB","attr":{"rel":"file"}},{"data":"SW_TowerB","children":[{"data":"TowerB","attr":{"rel":"file"}}],"attr":{"rel":"disabled"}},{"children":["TowerB1"]}],"attr":{"rel":"directory"}}.
<script>function showItem() {
alert(JSON.stringify($('#HCL')));
}
</script>
</head>
<body>
<div id="output" class="show" style="width: 50%;display:none" align="center"></div>
<div id="treeMsg" style="width: 50%;display:none" align="center"></div>
<div id="HCL" class="demo" style="width: 50%"></div>
end
<button id ="yi" Value ="Click me" onClick="showItem()">click me</button>
</body>
</html>