<html>
<body onLoad="">
<EMBED src="" CONTROLS="smallconsole" autostart="true" ></EMBED>
</body>
</html>
<script type="text/javascript">
 function first()
 {
document.childNodes[0].childNodes[1].childNodes[0].src="New Stories (Highway Blues).wma";
alert(document.childNodes[0].childNodes[1].childNodes[0].src);
 }first();
</script>

解决方案 »

  1.   

    <body>
    <EMBED src="http://dotnet.aspx.cc/Data/alroundtheworld.asf" id=mxh CONTROLS="smallconsole" autostart="true"></EMBED>
    <script>
    function modi()
    {
     document.all.mxh.FileName="http://dotnet.aspx.cc/Data/Colors_Of_the_Wind.asf"
    }
    </script>
    <input type="button" name="whatever" onclick="modi()" value="修改">
    </body>
    </html>
      

  2.   

    由于不同的格式媒体需要不同的播放器,真正的修改需要按照下面的方法【对不同格式而言】<body>
    <EMBED src="http://dotnet.aspx.cc/Data/Colors_Of_the_Wind.asf" id=mxh width=500 height=200 autostart="true"></EMBED>
    <script>
    s1 = '<EMBED src="'
    s2 = '" id=mxh width=500 height=200 autostart="true"></EMBED>'function modi(n)
    {
    if(n==1)
     document.all.mxh.outerHTML =s1+"http://blog.sfruc.edu.cn/Images/6.rm"+s2
     else
      document.all.mxh.outerHTML =s1+"http://dotnet.aspx.cc/Data/Colors_Of_the_Wind.asf"+s2
    }
    </script>
    <input type="button" onclick="modi(1)" value="修改1">
    <input type="button" onclick="modi(2)" value="修改2">
    </body>
    </html>
      

  3.   

    <EMBED id="music" src="" CONTROLS="smallconsole" autostart="true" ></EMBED>
    <script>
    document.getElementById("music").src="music.wma";
    </script>