Changing the header Saleforce Logo in the visualforce
Try with this code..
get the logo image element using javascript and change the src value
<apex:page >
<script>
document.getElementsByClassName('phHeaderCustomLogo')[0].getElementsByTagName('img')[0].src = 'https://www.google.co.in/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png';
</script>
</apex:page>
Output
You can achieve this with javascript . This is the example. The header logo is an image with id phHeaderLogoImage . We can change them using javascript and it will be good to go.
Check the below code:
<apex:page >
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page
<!-- End Default Content REMOVE THIS -->
<script>
window.onload = function() {
var element=document.getElementById("phHeaderLogoImage");
// alert(element.src);
element.src="https://pbs.twimg.com/profile_images/657703841085935616/EulXOwHD.png";
};
</script>
</apex:page>