object, param, jquery

前端 未结 5 1183
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 15:33

    
    
             


        
      
      
      
5条回答
  •  孤城傲影
    2020-12-01 15:51

    After searching for info, it seems you cannot dynamically change the param element's attributes dynamically. The simplest way will probably be to pull the element's HTML into a variable, feed that back into jQuery, and use CSS selectors on that. Then you could clear the object and replace it with the new code.

    var url = (url here);
    var code = $("#embedded").html();
    var newcode = $("param:first", code).attr("src", url).html();
    $("#embedded").html(newcode);
    

    or something like that... ;)

提交回复
热议问题