Javascript Check if a string exists javascript August 20, 2012 Pramod T P <script type=”text/javascript”> if(window.location.href.indexOf(“https:”) > -1) { alert(“its a secure URL”); } </script>