开发者

IE7 with PrototypeJS readAttribute and writeAttribute

I am getting errors like "Object doesn't support property or method 'writeAttribute'" in IE7 with a script. It works fine in all other browsers I have tried. The code is as follows:

var imgData = [ 
    ['../images/1.png','1'], 
    ['../images/2.png','2'],
    ['../images/3.png','3']
];
imgArray = new Array(); 
for(i=0; i < imgData.length; i++){ 
    imgArray[i] = new Image(); 
    imgArray[i].writeAttribute('src',imgData[i][0])开发者_JS百科;
} 

Can anyone point me in the right direction to get this working in IE7.

Thanks.


I had to change writeAttribute to setAttribute and readAttribute to getAttribute.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜