I wonder if someone knows how to do this.
I'm trying to figure out how to remove the complete event and handler -
onLoad="Bob()" as in Example 1 below - if they are the only ones in the body tag.
Or, remove "only" the handler - "Bob()" if another handler is present as in Example2 below.
Example1 <body onLoad="Bob()">
Example2 <body onLoad="Bob();Bill()">
These examples could as well be like:
People="Bob"
People="Bob","Bill"
I know how to access the elements in the DOM but I don't know how to make the script see if they both exist or not and if they do delete only the one specified to be removed and leave the other one.
Bob
Mark
I'm trying to figure out how to remove the complete event and handler -
onLoad="Bob()" as in Example 1 below - if they are the only ones in the body tag.
Or, remove "only" the handler - "Bob()" if another handler is present as in Example2 below.
Example1 <body onLoad="Bob()">
Example2 <body onLoad="Bob();Bill()">
These examples could as well be like:
People="Bob"
People="Bob","Bill"
I know how to access the elements in the DOM but I don't know how to make the script see if they both exist or not and if they do delete only the one specified to be removed and leave the other one.
Bob
Mark