FCK Editor 2.5.1 使用Flash的BUG

FCK Editor 2.5.1 使用Flash有个BUG。重新步骤

1. 插入一个flash

2. 切换到代码试图,可以看到代码:<embed src="http://www.tudou.com/v/W9XqdOthNag" type="application/x-shockwave-flash" width="400" height="300" allowFullScreen="true" wmode="transparent" allowScriptAccess="always"></embed>

3.切换到html试图,选中这个flash对象,

4.切换到代码试图,发现代码里丢失了 type="application/x-shockwave-flash"

以上步骤多重复几次,即可重现。

经过测试,发现IE 在处理<embed 属性是是存在问题的。

测试的例子:

< input id = " gggg "  type = " button "  value = " test() "  onclick = " test() "   />
 
< script >
   
var  o = document.getElementById( " gggg " );
   alert(o.getAttribute( " type " ));   //返回button ,正确
   alert(o.attributes[
" type " ].nodeValue); // //返回button ,正确

</ script >

 

< embed id = " ffff "  src = " http://www.tudou.com/v/W9XqdOthNag "  type = " application/x-shockwave-flash "  width = " 400 "  height = " 300 "  allowFullScreen = " true "  wmode = " transparent "  allowScriptAccess = " always " ></ embed >

 
var  o = document.getElementById( " ffff " );
 
alert(o.getAttribute(
" type " ));   // 返回null  错误!!!
alert(o.attributes[ " type " ].nodeValue)  // 返回 application/x-shockwave-flash 正确

这个问题是导致FCKEditor 无法正确处理flash 的根本原因!!

 

 

http://www.fckeditor.net/forums/viewtopic.php?f=5&t=8158

 

 

你可能感兴趣的:(html,测试,fckeditor,Flash,null,button)