<!DOCTYPE html> <html> <body> <p id="demo">Click me.</p> <script> document.getElementById("demo").addEventListener("click", m); function m() { var a=document.getElementById("demo").innerHTML; var b=""; for (i=0; i<a.length; i++) { if (a.charCodeAt(i)>65 && a.charCodeAt(i)<=90) { b=b+a.charAt(i).toLowerCase(); } else b=b+a.charAt(i).toUpperCase(); } alert(b); } } </script> </body> </html>
else {
addEventListener
m
m = …
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)