Update flashvars and reload flash with jQuery

前端 未结 5 827
花落未央
花落未央 2020-12-29 11:45

I would like to update the flashvars value argument to view another video:


I foun

5条回答
  •  旧时难觅i
    2020-12-29 12:38

    // update flashvars
    var fv = 'foobar=1';
    
    $("object param[name='flashvars']").attr("value", fv);
    $("embed").attr("flashvars", fv);
    
    // create new object to hold it     
    var obj = $("object");
    
    // remove existing Flash from DOM
    $("object").remove();
    
    // add new HTML to DOM
    $("#mviewer").append(obj.html());
    

提交回复
热议问题