i wrote part of this code and part of it took from other open source codes, now i want to see all the Dynamic div's this code is created with:
<input id="count_divs" type="button" value="Count divs" onclick="getIds(id);" />
i need to find all Dynamic div's.

the all code is here:
Code:
<html>
<head runat="server">
<title>Create Dynamic div using javascript</title>
<style type="text/css">
        .classA
        {
                background-color: #fafafa;
                font-size:large;
        }
</style>
<script type="text/javascript" language="javascript">
        onload = function()
        {
                window.p=0;
        }
 
        function sendvalue()
        {
                var str1=new String ("hello");
                window.p++;
                CallDiv(str1+" "+window.p);
        }
 
        function CallDiv(str) {
		window.z++;
		var divTag = document.createElement("div");
		divTag.id = "divDyn";
		divTag.name="divDyn";
		divTag.className = "classA";
		divTag.innerHTML = str;
		document.getElementById("id").appendChild(divTag);
		//document.body.id.appendChild(divTag);
        }
 
        function getIds(par){
        par = document.getElementById(par).getElementsByTagName('divTag');
        for(var a = [], i = 0; i < par.length; ++i)
        a.push(par[i].id || 'has no ID');
        alert(a.join('\n'));
        };
</script>
</head>
 
<body>
        <form id="form1" runat="server">
                <div style="background-color: red; font-size:large;">
                <input id="btClick" type="button" value="Click" onclick="sendvalue();" />
                <br />
                <input id="count_divs" type="button" value="Count divs" onclick="getIds(id);" />
                <br />
                </div>
                <br />
                <div id="id"></div>
        </form>
</body>
</html>