Javascript examples for String Operation:String Character
Compare equals '=' character in javascript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> </head> //w w w .j av a2 s . c o m <body> <button class="calcinput" type="button">1</button> <button class="calcinput" type="button">2</button> <button class="calcinput" type="button" value="=">=</button> <script type="text/javascript"> $(".calcinput").on('click',function(){ if($(this).val() === "="){ console.log("equal"); } }) </script> </body> </html>