How to change the value of embed src with JavaScript?

前端 未结 3 1599
礼貌的吻别
礼貌的吻别 2020-12-06 12:16

I have just begun to learn JS. I am trying to change the value of embed src in the tag present in my HTML code. But am unable to do so with the following code I\'ve written

3条回答
  •  生来不讨喜
    2020-12-06 13:01

    you can set src of embed tag in javascript, for that you must have to write your embed tag in javascript like below example :

    function onclickofSomething() {
        $('#IDOfParentElement').html("");
    }
    

    you can also see below url : need to set video file name using javascript http://www.webdeveloper.com/forum/showthread.php?53086-how-to-change-the-src-in-lt-embed-gt-using-javascript http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/16626/how-to-change-the-the-value-of-src-in-embed-using-javascript

提交回复
热议问题