set Style()throwing errors in IE when object does not exist
1047 ワード
Kickboy wrote:>I'm trying to set the style of elemens that are created through>document.creatElement()using the set Style()function.Look s>something like this:>>var newdiv=documentement.cment'newdiv.set Style({> position:'relative' width:'100 px' ...> });Try this:
Yes,IE doesn't support native prototypes for DOM stuff-only for corever JavaScript stuff like Aray,Object,Funct etc.
回転:http://www.mail-archive.com/prototype-core@google groups.com/msg 00764.html
var newdiv = Element.extend(document.createElement('div'));
newdiv.setStyle({
position: 'relative',
width: '100px'
...
});
IE doesn't atootmaticaally exted new element s based on their Javascript prototypeeven though it shough it shoult since that's prototype programming means.But owell.Yes,IE doesn't support native prototypes for DOM stuff-only for corever JavaScript stuff like Aray,Object,Funct etc.
回転:http://www.mail-archive.com/prototype-core@google groups.com/msg 00764.html