crop_rotate
Run
<!DOCTYPE html> <html> <head> <style> .mystyle { width: 500px; height: 50px; border: 1px solid black; } .anotherClass { background-color: lightblue; padding: 25px; } .thirdClass { text-align: center; font-size: 25px; color: navy; margin-bottom: 10px; } </style> </head> <body> <p>Click the button to find out if the DIV element has a class of "mystyle".</p> <div id="myDIV" class="mystyle anotherClass thirdClass"> I am a DIV element </div> <button onclick="myFunction()">Try it</button> <p><strong>Note:</strong> The classList property is not supported in Internet Explorer 9 and earlier versions.</p> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myDIV").classList.contains("mystyle"); document.getElementById("demo").innerHTML = x; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KLm15c3R5bGUgew0KICB3aWR0aDogNTAwcHg7DQogIGhlaWdodDogNTBweDsNCiAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7DQp9DQoNCi5hbm90aGVyQ2xhc3Mgew0KICBiYWNrZ3JvdW5kLWNvbG9yOiBsaWdodGJsdWU7DQogIHBhZGRpbmc6IDI1cHg7DQp9DQoNCi50aGlyZENsYXNzIHsNCiAgdGV4dC1hbGlnbjogY2VudGVyOw0KICBmb250LXNpemU6IDI1cHg7DQogIGNvbG9yOiBuYXZ5Ow0KICBtYXJnaW4tYm90dG9tOiAxMHB4Ow0KfQ0KPC9zdHlsZT4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+IDo6LXdlYmtpdC1zY3JvbGxiYXJ7d2lkdGg6N3B4O2hlaWdodDo3cHg7fTo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2t7YmFja2dyb3VuZDojZmZmO306Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1ie2JvcmRlci1yYWRpdXM6NXB4O2JhY2tncm91bmQ6IzJmNDVmZjt9PC9zdHlsZT48L2hlYWQ+DQo8Ym9keT4NCg0KPHA+Q2xpY2sgdGhlIGJ1dHRvbiB0byBmaW5kIG91dCBpZiB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