crop_rotate
Run
<!DOCTYPE html> <html> <head> <title>get element by Name JavaScript</title> </head> <body> <h1>Welcome To Dom</h1> <p name="like"> Get element by id name</p> <p> Get elements by class name</p> <p name="like"> Get elements by tag name</p> <p name="like"> Get elements by name</p> <script> let paragraphs = document.getElementsByName('like'); //check Console document.write(paragraphs.length); </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPmdldCBlbGVtZW50IGJ5IE5hbWUgSmF2YVNjcmlwdDwvdGl0bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPiA6Oi13ZWJraXQtc2Nyb2xsYmFye3dpZHRoOjdweDtoZWlnaHQ6N3B4O306Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNre2JhY2tncm91bmQ6I2ZmZjt9Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYntib3JkZXItcmFkaXVzOjVweDtiYWNrZ3JvdW5kOiMyZjQ1ZmY7fTwvc3R5bGU+PC9oZWFkPg0KPGJvZHk+DQogICA8aDE+V2VsY29tZSBUbyBEb208L2gxPg0KICAgPHAgbmFtZT0ibGlrZSI+IEdldCBlbGVtZW50IGJ5IGlkIG5hbWU8L3A+DQogICA8cD4gR2V0IGVsZW1lbnRzIGJ5IGNsYXNzIG5hbWU8L3A+DQogICA8cCBuYW1lPSJsaWtlIj4gR2V0IGVsZW1lbnRzIGJ5IHRhZyBuYW1lPC9wPg0KICAgPHAgbmFtZT0ibGlrZSI+IEdldCBlbGVtZW50cyBieSBuYW1lPC9wPg0KICAgIDxzY3JpcHQ+DQogICAgICAgIGxldCBwYXJhZ3JhcGhzID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeU5hbWUoJ2xpa2UnKTsNCiAgICAgICAgLy9jaGVjayBDb25zb2xlDQogICAgICAgIGRvY3VtZW50LndyaXRlKHBhcmFncmFwaHMubGVuZ3RoKTsNCiAgICA8L3NjcmlwdD4NCjwvYm9keT4NCjwvaHRtbD4=