jQuery replace a string

<html>
<head>
<script type=”text/javascript” src=”jquery.js”></script>
</head>
<div id=”divId”>
<iframe src=”http://phpcodez.com” scrolling=”no” frameborder=”0″ style=”border: none; width: 90px; height: 20px; “></iframe>
</div>
<script type=”text/javascript”>
jQuery.noConflict();
jQuery(document).ready(function() {
if(jQuery(“#divId”+” iframe”).attr(‘src’).indexOf(“https”)<=-1) {
var newSrc = jQuery(“#divId”+” iframe”).attr(‘src’).replace(“http”,”https”);
jQuery(“#divId”+” iframe”).attr(‘src’,newSrc);
alert(jQuery(“#divId”+” iframe”).attr(‘src’));
}
});
</script>
</html>

jQuery check if string contains another string

<html>
<head>
<script type=”text/javascript” src=”jquery.js”></script>
</head>
<div id=”divId”>
<iframe src=”http://phpcodez.com” scrolling=”no” frameborder=”0″ style=”border: none; width: 90px; height: 20px; “></iframe>
</div>
<script type=”text/javascript”>
jQuery.noConflict();
jQuery(document).ready(function() {
if(jQuery(“#divId”+” iframe”).attr(‘src’).indexOf(“https”)<=-1) {
alert(“Its not a secure url”);
}
});
</script>
</html>

jQuery

jQuery is a multi-browser JavaScript library designed to simplify the client-side scripting of HTML. It was released in January 2006 at BarCamp NYC by John Resig. Used by over 55% of the 10,000 most visited websites, jQuery is the most popular JavaScript library in use today