/    Sign up×
Community /Pin to ProfileBookmark

Remove element from tag

I am after removing the border=”0″ and the style element from the following tag, can anyone give advice about how to go about this? Many thanks.

<table id=”ctl00_ToolbarLayout” class=”Calendar” cellspacing=”0″ cellpadding=”0″ border=”0″ style=”border-style:None;width:100%;border-collapse:collapse;”>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangApr 28.2009 — document.getElementById('ctl00_ToolbarLayout').removeAttribute('border');
Copy linkTweet thisAlerts:
@ZeroKilledApr 28.2009 — has been struggling why certain attribute can't be removed using [b]removeAttribute[/b] in msie7 browser. noticed something interesting but also very bad. msie7 expect the attribute argument to be named as is were used as property in javascript. for example, if you want to remove the [b]class[/b] attribute, on msie7 you would use [b][i]element[/i].removeAttribute('className')[/b] (also notice the capitalization) while on standard browser you would pass the name as used in HTML source code.
×

Success!

Help @abis123 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...