I am trying to remove the following span:
<span style=”margin: 2px; margin-left: 10px; float: right; width:
301px; height: 251px; padding: 5px; background-color: #000000;”>
Here is my code:
window.addEventListener(‘load’,
function() {
var s;
var find;
find = ‘margin: 2px; margin-left: 10px; float: right; width:
301px; height: 251px; padding: 5px; background-color: #000000′;
s = document.getElementsByTagName(‘body’)
[0].getElementsByTagName(‘span style’)[0];
s.innerHTML = s.innerHTML.replace(find,””);},
true);
What do I need to change to make this work?
I’ve tried many other codes going about it, none seeming to work.
Currently, I have this:
window.addEventListener(‘load’,
function() {
var s;
var find;
find = ‘width: 301px; height: 251px’;
s = document.getElementsByTagName(‘body’)
[0].getElementsByTagName(‘span’)[0];
s.innerHTML = s.innerHTML.replace(find,””);},
true);
I’ve tried some others, but I’ve since deleted those entirely. I know very very little about the java language, so any help is appreciated. I get that it’s calling a function then it has the definitions, but the actual coding just really loses me. I’m too unfamiliar with the formatting and variables.