crop_rotate
Run
<!DOCTYPE html> <html> <body> <ul id="myList"> <li>Coffee</li> <li>Tea</li> </ul> <p>Click the button to see if the ul element has any child nodes.</p> <button onclick="myFunction()">Try it</button> <p>Try removing the child nodes of the list element, and the result will be false instead of true.</p> <p><strong>Note:</strong> Whitespace inside a node is considered as text nodes, so if you leave any white space or line feeds inside an element, that element still has child nodes.</p> <p id="demo"></p> <script> function myFunction() { var list = document.getElementById("myList").hasChildNodes(); document.getElementById("demo").innerHTML = list; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8dWwgaWQ9Im15TGlzdCI+DQogIDxsaT5Db2ZmZWU8L2xpPg0KICA8bGk+VGVhPC9saT4NCjwvdWw+DQoNCjxwPkNsaWNrIHRoZSBidXR0b24gdG8gc2VlIGlmIHRoZSB1bCBlbGVtZW50IGhhcyBhbnkgY2hpbGQgbm9kZXMuPC9wPg0KDQo8YnV0dG9uIG9uY2xpY2s9Im15RnVuY3Rpb24oKSI+VHJ5IGl0PC9idXR0b24+DQoNCjxwPlRyeSByZW1vdmluZyB0aGUgY2hpbGQgbm9kZXMgb2YgdGhlIGxpc3QgZWxlbWVudCwgYW5kIHRoZSByZXN1bHQgd2lsbCBiZSBmYWxzZSBpbnN0ZWFkIG9mIHRydWUuPC9wPg0KDQo8cD48c3Ryb25nPk5vdGU6PC9zdHJvbmc+IFdoaXRlc3BhY2UgaW5zaWRlIGEgbm9kZSBpcyBjb25zaWRlcmVkIGFzIHRleHQgbm9kZXMsIHNvIGlmIHlvdSBsZWF2ZSBhbnkgd2hpdGUgc3BhY2Ugb3IgbGluZSBmZWVkcyBpbnNpZGUgYW4gZWxlbWVudCwgdGhhdCBlbGVtZW50IHN0aWxsIGhhcyBjaGlsZCBub2Rlcy48L3A+DQoNCjxwIGlkPSJkZW1vIj48L3A+DQoNCjxzY3JpcHQ+DQpmdW5jdGlvbiBteUZ1bmN0aW9uKCkgew0KICB2YXIgbGlzdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJteUxpc3QiKS5oYXNDaGlsZE5vZGVzKCk7DQogIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJkZW1vIikuaW5uZXJIVE1MID0gbGlzdDsNCn0NCjwvc2NyaXB0Pg0KDQo8L2JvZHk+DQo8L2h0bWw+