How can I dynamically add an <object> tag with JavaScript in IE?

前端 未结 3 851
不知归路
不知归路 2020-12-16 08:16

I have to add either an embed tag for Firefox or an object tag for Internet Explorer with JavaScript to address the appropriate ActiveX / Plugin depending on the browser. Th

3条回答
  •  不知归路
    2020-12-16 08:42

    var object = document.createelement('object')
    object.setAttribute('id','name')
    object.setAttribute('clssid','CLSID:{}')
    

    And the same for other parameters.

提交回复
热议问题