You know well about -
indexof() returns the position of first occurrence of a specified value.
window.self.location returns the path of the window.
<script type="text/javascript">
var url = ''+ window.self.location;
if (url.indexOf('yoursite.com')!=-1)
{
document.getElementById('wrapper').style.backgroundColor ='green';
//You can modify here
}
</script>
No comments:
Post a Comment