我已经进一步缩小了问题范围,但仍然不明白发生了什么。在 SWFOjbject 2.2 第 436 行中,javascript 试图用新对象及其参数替换“el”元素。
当我发出“par”警报时,我会看到参数列表,其中包含我期望的 flashvar。
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="allowScriptAccess" value="sameDomain">
<param name="flashvars" value="uploadifyID=fileInput&pagepath=/clients/WhackCMS/admin/js/tinymce/plugins/whackupload/&buttonImg=http%3A//192.168.0.4/clients/WhackCMS/admin/img/btn-browse.png&script=http://192.168.0.4/clients/WhackCMS/admin/pages/upload&folder=&scriptData=single-auth-token%3Dd06ac6f98b93d980fe7fa1e24fa91ab3f36622ea%26thumb-size%3D150x150&width=157&height=31&wmode=opaque&method=GET&queueSizeLimit=999&simUploadLimit=1&fileDesc=Images&fileExt=*.jpg;*.jpeg;*.gif;*.png&auto=true&fileDataName=Filedata">
我已经尝试了默认的 el.outerHTML 和 $(el).replaceWith 方法,但是当我尝试查看更新的“el”对象时,我看到的只是一些默认参数:
<OBJECT style="VISIBILITY: visible" id=fileInputUploader classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=157 height=31>
<PARAM NAME="_cx" VALUE="4153">
<PARAM NAME="_cy" VALUE="820">
<PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="http://192.168.0.4/clients/WhackCMS/admin/uploader_tinymce.swf">
<PARAM NAME="Src" VALUE="http://192.168.0.4/clients/WhackCMS/admin/uploader_tinymce.swf">
<PARAM NAME="WMode" VALUE="Opaque">
<PARAM NAME="Play" VALUE="0">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="LT">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="sameDomain">
<PARAM NAME="Scale" VALUE="NoScale">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE="">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<PARAM NAME="Profile" VALUE="0">
<PARAM NAME="ProfileAddress" VALUE="">
<PARAM NAME="ProfilePort" VALUE="0">
<PARAM NAME="AllowNetworking" VALUE="all">
<PARAM NAME="AllowFullScreen" VALUE="false">
</OBJECT>
似乎 el 元素根本没有被正确替换。当我在 Firefox 和 safari 中尝试此操作时,html 会正确更新。