开发者

execCommand("BackColor",false,"#000000") is causing my Whole Editable Iframe's Background Color TO Change!

ok I am making a WYSIWYG editor in Javascript and I Ran Into Problems

when I execute:

idframe.document.execCommand("BackColor",false,"#000000");

My Whole Iframe's Background Color Changes to Black. Even When There Is a Selection Made by The User. Thin only seems to happen in Firefox & Opera But Not in Internet Explorer & Chrome.This I开发者_运维知识库s Kinda Weird.


Use 'hilitecolor' instead, for none IE browsers. 'BackColor' on these browsers act differently from IE. It's used to change whole document color not just selected text.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜