crop_rotate
Run
<!DOCTYPE html> <html> <body> <p>Click the button to display the name of the button's second attribute (index 1).</p> <button id="myBtn" onclick="myFunction()">Try it</button> <p><strong>Note:</strong> In Internet Explorer 8 and earlier, the attributes property will return a collection of all possible attributes for the element, and will, in this example, display the name of a different attribute.</p> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myBtn").attributes[1].name; document.getElementById("demo").innerHTML = x; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8cD5DbGljayB0aGUgYnV0dG9uIHRvIGRpc3BsYXkgdGhlIG5hbWUgb2YgdGhlIGJ1dHRvbidzIHNlY29uZCBhdHRyaWJ1dGUgKGluZGV4IDEpLjwvcD4NCg0KPGJ1dHRvbiBpZD0ibXlCdG4iIG9uY2xpY2s9Im15RnVuY3Rpb24oKSI+VHJ5IGl0PC9idXR0b24+DQoNCjxwPjxzdHJvbmc+Tm90ZTo8L3N0cm9uZz4gSW4gSW50ZXJuZXQgRXhwbG9yZXIgOCBhbmQgZWFybGllciwgdGhlIGF0dHJpYnV0ZXMgcHJvcGVydHkgd2lsbCByZXR1cm4gYSBjb2xsZWN0aW9uIG9mIGFsbCBwb3NzaWJsZSBhdHRyaWJ1dGVzIGZvciB0aGUgZWxlbWVudCwgYW5kIHdpbGwsIGluIHRoaXMgZXhhbXBsZSwgZGlzcGxheSB0aGUgbmFtZSBvZiBhIGRpZmZlcmVudCBhdHRyaWJ1dGUuPC9wPg0KDQo8cCBpZD0iZGVtbyI+PC9wPg0KDQo8c2NyaXB0Pg0KZnVuY3Rpb24gbXlGdW5jdGlvbigpIHsNCiAgdmFyIHggPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgibXlCdG4iKS5hdHRyaWJ1dGVzWzFdLm5hbWU7DQogIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJkZW1vIikuaW5uZXJIVE1MID0geDsNCn0NCjwvc2NyaXB0Pg0KDQo8L2JvZHk+DQo8L2h0bWw+