gpt4 book ai didi

jQuery 在 Flash 对象参数上替换?

转载 作者:行者123 更新时间:2023-12-01 08:28:57 26 4
gpt4 key购买 nike

给定一个

<div id="dialog" style="display:none; width:100%; vertical-align:middle;">
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="628" height="400">
<param name="movie" value="../../help/videos/videoplayer.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=../../help/videos/video.flv" />
<object type="application/x-shockwave-flash" data="../../help/videos/videoplayer.swf" width="628" height="400">
<param name="movie" value="../../help/videos/videoplayer.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=../../help/videos/video.flv" />
</object>
</object>

为什么不会

$("#dialog").find('<param name="flashvars" value="file=../../help/videos/video.flv" />').replaceWith('<param name="flashvars" value="file=../../help/videos/myfile.flv" />');

工作?

最佳答案

您没有传递选择器来查找,您可以执行以下操作:

$('#player param[name=flashvars]').attr('value','new value');

关于jQuery 在 Flash 对象参数上替换?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1194846/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com