Saturday, February 20, 2010

changing value of meta tag with javascript

Interesting:
if you assign value of meta tag element in javascript
using the
eMeta.setAttribute('content', somenewvalue);

it will not be found if looking for for it this way:
eMeta.content but the attribute value of 'content' will actually
be set and could be seen in Firebug right away.

But it will work if just setting value by assignment, like this
eMeta.content = 'somenewval';

This is in Firefox, not sure how it will work in other browsers

No comments:

Post a Comment