crop_rotate
Run
<!DOCTYPE html> <html> <head> <style> div { border: 1px solid black; margin: 5px; } </style> </head> <body> <p>Click the button to find out how many children the div element below has.</p> <button onclick="myFunction()">Try it</button> <div id="myDIV"> <p> element </p> <p> element </p> <p> element </p> <p> element </p> <p> element </p> </div> <p><strong>Note:</strong> The childElementCount property is not supported in IE8 and earlier versions.</p> <p id="demo"></p> <script> function myFunction() { var c = document.getElementById("myDIV").childElementCount; document.getElementById("demo").innerHTML = c; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KZGl2IHsNCiAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7DQogIG1hcmdpbjogNXB4Ow0KfQ0KPC9zdHlsZT4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+IDo6LXdlYmtpdC1zY3JvbGxiYXJ7d2lkdGg6N3B4O2hlaWdodDo3cHg7fTo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2t7YmFja2dyb3VuZDojZmZmO306Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1ie2JvcmRlci1yYWRpdXM6NXB4O2JhY2tncm91bmQ6IzJmNDVmZjt9PC9zdHlsZT48L2hlYWQ+DQo8Ym9keT4NCg0KPHA+Q2xpY2sgdGhlIGJ1dHRvbiB0byBmaW5kIG91dCBob3cgbWFueSBjaGlsZHJlbiB0aGUgZGl2IGVsZW1lbnQgYmVsb3cgaGFzLjwvcD4NCg0KPGJ1dHRvbiBvbmNsaWNrPSJteUZ1bmN0aW9uKCkiPlRyeSBpdDwvYnV0dG9uPg0KDQo8ZGl2IGlkPSJteURJViI+DQogICAgIDxwPiBlbGVtZW50IDwvcD4NCiAgICAgPHA+IGVsZW1lbnQgPC9wPg0KICAgICA8cD4gZWxlbWVudCA8L3A+DQogICAgIDxwPiBlbGVtZW50IDwvcD4NCiAgICAgPHA+IGVsZW1lbnQgPC9wPg0KDQo8L2Rpdj4NCg0KPHA+PHN0cm9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