<html> <head> <script> function demo1() { var str1 = document.getElementById("input1").value var str2 = document.getElementById("input2").value if(str1 == str2) { document.write("both strings same") } else { document.write("Not same") } } </script> </head> <body> <input type= "text" id="input1" placeholder="enter data"/> <br> <input type= "text" id="input2" placeholder="enter data"/> <br><br> <input type="button" value="Check Equal" onclick="demo1()" /><br> </body> </html>
Office no.- 401,Shekhar Central Building ,Palasiya, Pin-code:452001, Indore
contact@codebetter.in
+91 88230 75444, +91 99939 28766